Network Processor Module

    is-dev

    0.1.4 • Public • Published

    is-dev

    Check if you're on a development version or the live version of your site

    Build Status npm version

    A tiny script that displays a message if you're on the development version of a site, so you can visually distinguish it from the live version.

    Installation

    is-dev is on npm, so installing it is as easy as doing:

    $ npm install --save is-dev
    

    Usage

    Include either is-dev.js via a script tag, or require('is-dev') in your script. After that you can call it like this (all options are optional):

    demo and full documentation

    isDev({
      dev: [
        '.dev',
        'localhost',
        'file:///'
      ], // parts of the url that can mean you're developing
      message: 'development',
      style: 'top-left',
      // top-left, top-right, bottom, top, none
      custom: 'display: block; background-color: red; font: Comic Sans MS'
      // custom css that extends the style
    });

    Support

    IE9 and up (array.map).

    License

    Apache 2.0

    Install

    npm i is-dev

    DownloadsWeekly Downloads

    7

    Version

    0.1.4

    License

    Apache-2.0

    Last publish

    Collaborators

    • haroenv