case-combiner

1.1.0 • Public • Published

case-combiner

npm GitHub license Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i case-combiner

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • black_glory