case-combiner
v1.1.0
Published
A high performance function to find all lowercase and uppercase combinations of a string in JavaScript.
Downloads
1
Readme
case-combiner
A high performance function to find all lowercase and uppercase combinations of a string in JavaScript.
Usage
combiner('http')
[...combineGenerator('http')]
/*
[
"HTTP", "HTTp", "HTtP", "HTtp", "HtTP"
, "HtTp", "HttP", "Http", "hTTP", "hTTp"
, "hTtP", "hTtp", "htTP", "htTp", "httP"
, "http"
].length === 16
*/
combiner('http://')
[...combineGenerator('http://')]
/*
[
"HTTP://", "HTTp://", "HTtP://", "HTtp://", "HtTP://"
, "HtTp://", "HttP://", "Http://", "hTTP://", "hTTp://"
, "hTtP://", "hTtp://", "htTP://", "htTp://", "httP://"
, "http://"
].length === 16
*/
Install
NPM
npm install case-combiner
Yarn
yarn add case-combiner
Import
ECMAScript Next Style
import { combiner, combineGenerator } from 'case-combiner'
CommonJS Style
const { combiner, combineGenerator } = require('case-combiner')
Test(Include performance test case)
NPM
npm test
Yarn
yarn test