package/package.json000666 000000 000000 0000001407 12765635727013017 0ustar00000000 000000 { "name": "is-node", "version": "1.0.2", "description": "Detect if current process is a node application or not.", "author": { "name": "matthewh", "email": "hello@matthewh.in", "url": "http://matthewh.in/" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "private": false, "main": "index.js", "homepage": "https://github.com/MatthewNPM/is-node", "repository": { "type": "git", "url": "https://github.com/MatthewNPM/is-node" }, "bugs": { "url": "https://github.com/MatthewNPM/is-node/issues" }, "engines": { "node": ">= 0.10" }, "keywords": [ "is", "node", "detect", "process" ], "files": [ "examples/", "README.md", "index.js" ], "license": "MIT" } package/README.md000666 000000 000000 0000000345 12765635727012010 0ustar00000000 000000 # Is Node? Detects if the current process is a node application or not. ## Install `$ npm install is-node` ## Usage ```javascript var isNode = require('is-node'); if (isNode) { console.log("Hey, I'm a node process!"); } ``` package/index.js000666 000000 000000 0000000352 12765635727012174 0ustar00000000 000000 // Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md 'use strict'; exports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node); package/examples/basic.js000666 000000 000000 0000000443 12765635727013765 0ustar00000000 000000 // Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md const $isNode = require('../'); if ($isNode) { console.log('This is a node process.'); } else { console.log('What kind of witchcraft is this? This is not a node process.'); }