Map the casing of one word to another.
$ npm install map-caseExact, character to character case mapping.
from- Word with target case.to- Targeted word.
const mapCase = require('map-case');
mapCase.map('AaaA', 'bbbb') === 'BbbB';
// Ignores non-letters
mapCase.map('Aaa A', 'b1 bb') === 'B1 bB';Maps at most as many letters as from contains, ignoring the rest.
Same as map, but only tries to upper case letters in to according to the upper case letters in from.
const mapCase = require('map-case');
mapCase.upper('AaaA', 'bBbB') === 'BBbB';Same as map, but only tries to lower case letters in to according to the lower case letters in from.
const mapCase = require('map-case');
mapCase.lower('AaaA', 'bBbB') === 'bbbB';