0.0.0 • Published 8 years ago

map-case v0.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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.