map-case
v0.0.0
Published
Map casing of one word to another.
Downloads
14
Readme
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.