pax_global_header00006660000000000000000000000064123627066750014530gustar00rootroot0000000000000052 comment=d5b73b7ca7219bf75b409048238263344895afe5 is-npm-1.0.0/000077500000000000000000000000001236270667500127315ustar00rootroot00000000000000is-npm-1.0.0/.editorconfig000066400000000000000000000003621236270667500154070ustar00rootroot00000000000000# editorconfig.org root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [package.json] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false is-npm-1.0.0/.gitattributes000066400000000000000000000000141236270667500156170ustar00rootroot00000000000000* text=auto is-npm-1.0.0/.gitignore000066400000000000000000000000151236270667500147150ustar00rootroot00000000000000node_modules is-npm-1.0.0/.jshintrc000066400000000000000000000002761236270667500145630ustar00rootroot00000000000000{ "node": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "immed": true, "newcap": true, "noarg": true, "undef": true, "unused": "vars", "strict": true } is-npm-1.0.0/.travis.yml000066400000000000000000000000461236270667500150420ustar00rootroot00000000000000language: node_js node_js: - '0.10' is-npm-1.0.0/index.js000066400000000000000000000002231236270667500143730ustar00rootroot00000000000000'use strict'; module.exports = 'npm_config_username' in process.env || 'npm_package_name' in process.env || 'npm_config_heading' in process.env; is-npm-1.0.0/license000066400000000000000000000021371236270667500143010ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. is-npm-1.0.0/package.json000066400000000000000000000010631236270667500152170ustar00rootroot00000000000000{ "name": "is-npm", "version": "1.0.0", "description": "Check if your code is running as an npm script", "license": "MIT", "repository": "sindresorhus/is-npm", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "node test.js" }, "files": [ "index.js" ], "keywords": [ "npm", "is", "check", "detect", "env", "environment" ], "devDependencies": { "ava": "0.0.3" } } is-npm-1.0.0/readme.md000066400000000000000000000007351236270667500145150ustar00rootroot00000000000000# is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.org/sindresorhus/is-npm) > Check if your code is running as an [npm script](https://www.npmjs.org/doc/misc/npm-scripts.html) ## Install ```sh $ npm install --save is-npm ``` ## Usage ```js var isNpm = require('is-npm'); console.log(isNpm); ``` ```sh $ node foo.js #=> false $ npm run foo #=> true ``` ## License MIT © [Sindre Sorhus](http://sindresorhus.com) is-npm-1.0.0/test.js000066400000000000000000000001571236270667500142510ustar00rootroot00000000000000'use strict'; var test = require('ava'); var isNpm = require('./'); test(function (t) { t.assert(isNpm); });