is-mode
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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

npm version Build Status codecov dependencies Status devDependencies Status code style: prettier

License

MIT

Package Sidebar

Install

npm i is-mode

Weekly Downloads

3

Version

0.0.5

License

MIT

Unpacked Size

6.96 kB

Total Files

6

Last publish

Collaborators

  • himenoglyph