is-mode
v0.0.5
Published
Provides branching using query parameters.
Downloads
2
Maintainers
Readme
is-mode
Install
npm i is-mode
yarn add is-mode
Usage
If Browser
import { isMode } from "is-mode";
// http://localhost?mode=abc
isMode("abc") === true // true
Change check params
import { isMode, setup } from "is-mode";
setup({
modeKey: "newMode"
})
// http://localhost?newMode=abc
isMode("abc") === true // true
If Server Side
import { isMode } from "is-mode";
// in server side
isMode("any-key") === false // always true
Update
yarn outdated
yarn upgrade
Publish
yarn publish
Badges
License
MIT