isdevjs

1.0.3 • Public • Published

isdevjs

check if js environment is dev or prod

Returns boolean

import isDev from "isdevjs";

console.log(isDev());

Have it return values or function

import isDev from "isdevjs";

const func = isDev(
  () => "dev",
  () => "prod"
);

func();

const domain = isDev(window.location.hostname, "site.com");

Package Sidebar

Install

npm i isdevjs

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

2.3 kB

Total Files

4

Last publish

Collaborators

  • sunil.sharma.999