UNPKG

layaair2-cmd

Version:

layaair version 2 toolkit

125 lines (124 loc) 3.81 kB
{ "_args": [ [ { "raw": "defined@^1.0.0", "scope": null, "escapedName": "defined", "name": "defined", "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify" ] ], "_from": "defined@>=1.0.0 <2.0.0", "_id": "defined@1.0.0", "_inCache": true, "_location": "/defined", "_nodeVersion": "0.12.0", "_npmUser": { "name": "substack", "email": "mail@substack.net" }, "_npmVersion": "2.7.5", "_phantomChildren": {}, "_requested": { "raw": "defined@^1.0.0", "scope": null, "escapedName": "defined", "name": "defined", "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/browser-pack", "/browserify", "/detective", "/module-deps" ], "_resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", "_shasum": "c98d9bcef75674188e110969151199e39b1fa693", "_shrinkwrap": null, "_spec": "defined@^1.0.0", "_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "bugs": { "url": "https://github.com/substack/defined/issues" }, "dependencies": {}, "description": "return the first argument that is `!== undefined`", "devDependencies": { "tape": "~3.5.0" }, "directories": { "example": "example", "test": "test" }, "dist": { "shasum": "c98d9bcef75674188e110969151199e39b1fa693", "tarball": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" }, "gitHead": "3a46c81d39b5f94c0c17c47638939af2528520f3", "homepage": "https://github.com/substack/defined", "keywords": [ "undefined", "short-circuit", "||", "or", "//", "defined-or" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "substack", "email": "mail@substack.net" } ], "name": "defined", "optionalDependencies": {}, "readme": "# defined\n\nreturn the first argument that is `!== undefined`\n\n[![browser support](http://ci.testling.com/substack/defined.png)](http://ci.testling.com/substack/defined)\n\n[![build status](https://secure.travis-ci.org/substack/defined.png)](http://travis-ci.org/substack/defined)\n\nMost of the time when I chain together `||`s, I actually just want the first\nitem that is not `undefined`, not the first non-falsy item.\n\nThis module is like the defined-or (`//`) operator in perl 5.10+.\n\n# example\n\n``` js\nvar defined = require('defined');\nvar opts = { y : false, w : 4 };\nvar x = defined(opts.x, opts.y, opts.w, 100);\nconsole.log(x);\n```\n\n```\n$ node example/defined.js\nfalse\n```\n\nThe return value is `false` because `false` is the first item that is\n`!== undefined`.\n\n# methods\n\n``` js\nvar defined = require('defined')\n```\n\n## var x = defined(a, b, c...)\n\nReturn the first item in the argument list `a, b, c...` that is `!== undefined`.\n\nIf all the items are `=== undefined`, return undefined.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install defined\n```\n\n# license\n\nMIT\n", "readmeFilename": "readme.markdown", "repository": { "type": "git", "url": "git://github.com/substack/defined.git" }, "scripts": { "test": "tape test/*.js" }, "testling": { "files": "test/*.js", "browsers": { "ie": [ 6, 7, 8, 9 ], "ff": [ 3.5, 10, 15 ], "chrome": [ 10, 22 ], "safari": [ 5.1 ], "opera": [ 12 ] } }, "version": "1.0.0" }