map-case

0.0.0 • Public • Published

Map-Case

Map the casing of one word to another.

Installation

$ npm install map-case

API

map(from, to)

Exact, character to character case mapping.

  • from - Word with target case.
  • to - Targeted word.
const mapCase = require('map-case');
 
mapCase('AaaA', 'bbbb') === 'BbbB';
 
// Ignores non-letters
mapCase('Aaa A', 'b1 bb') === 'B1 bB';

Maps at most as many letters as from contains, ignoring the rest.

Package Sidebar

Install

npm i map-case

Weekly Downloads

3

Version

0.0.0

License

MIT

Last publish

Collaborators

  • mattbierner