Neutralize Pesky Miscreants
    Have ideas to improve npm?Join in the discussion! »

    @bemoje/is-node

    1.0.1 • Public • Published

    @bemoje/is-node

    Browser-safely returns whether the current process is a node-js process.

    Version

    NPM version

    Travis CI

    dependencies

    Dependencies

    dependencies

    Stats

    NPM downloads Forks

    Donate

    Buy Me A Beer donate button PayPal donate button

    Installation

    npm install @bemoje/is-node
    npm install --save @bemoje/is-node
    npm install --save-dev @bemoje/is-node

    Usage

    import isNode from '@bemoje/is-node'
     
    /**
     * USE IN NODE ENVIRONMENT
     */
    isNode()
    //=> true
     
    /**
     * SAFELY USE IN BROWSER ENVIRONMENT
     */
    isNode()
    //=> false
     

    Tests

    Uses Jest to test module functionality. Run tests to get coverage details.

    npm run test

    API

    isNode

    Browser-safely returns whether the current process is a node-js process.

    Returns

    boolean

    Install

    npm i @bemoje/is-node

    DownloadsWeekly Downloads

    18

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    6.54 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar