├── .gitignore ├── .gitattributes ├── .travis.yml ├── index.js ├── test.js ├── .editorconfig ├── readme.md ├── package.json └── license /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.js text eol=lf 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '6' 4 | - '4' 5 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = /iojs(?:\.exe)?$/.test(process.execPath); 3 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava'; 2 | import m from '.'; 3 | 4 | test(t => { 5 | console.log('Is io.js?', m); 6 | t.is(typeof m, 'boolean'); 7 | }); 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.yml] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Deprecated 2 | 3 | [io.js is no more.](https://nodejs.org/en/blog/announcements/foundation-v4-announce/) 4 | 5 | --- 6 | 7 | 8 | # is-io [![Build Status](https://travis-ci.org/sindresorhus/is-io.svg?branch=master)](https://travis-ci.org/sindresorhus/is-io) 9 | 10 | > Check if the runtime is io.js instead of Node.js 11 | 12 | 13 | ## Install 14 | 15 | ``` 16 | $ npm install --save is-io 17 | ``` 18 | 19 | 20 | ## Usage 21 | 22 | ```js 23 | const isIo = require('is-io'); 24 | 25 | if (isIo) { 26 | // Do something custom in io.js 27 | } else { 28 | // And something else in Node.js 29 | } 30 | ``` 31 | 32 | 33 | ## License 34 | 35 | MIT © [Sindre Sorhus](https://sindresorhus.com) 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-io", 3 | "version": "1.0.1", 4 | "description": "Check if the runtime is io.js instead of Node.js", 5 | "license": "MIT", 6 | "repository": "sindresorhus/is-io", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=4" 14 | }, 15 | "scripts": { 16 | "test": "ava" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "io", 23 | "iojs", 24 | "io.js", 25 | "node", 26 | "nodejs", 27 | "node.js", 28 | "is", 29 | "detect", 30 | "check", 31 | "runtime", 32 | "process", 33 | "execpath" 34 | ], 35 | "devDependencies": { 36 | "ava": "*" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | --------------------------------------------------------------------------------