is-http-url
Version:
Validate URLs for sane values
1 lines • 4.14 kB
JSON
{"_id":"defined","_rev":"8-6b3bc750f403fd63b6aec862c0ec330a","name":"defined","description":"return the first argument that is `!== undefined`","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"defined","version":"0.0.0","description":"return the first argument that is `!== undefined`","main":"index.js","directories":{"example":"example","test":"test"},"dependencies":{},"devDependencies":{"tap":"~0.3.0","tape":"~0.0.2"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/defined.git"},"homepage":"https://github.com/substack/defined","keywords":["undefined","short-circuit","||","or","//","defined-or"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","_id":"defined@0.0.0","dist":{"shasum":"f35eea7d705e933baf13b2f03b3f83d921403b3e","tarball":"https://registry.npmjs.org/defined/-/defined-0.0.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"1.0.0":{"name":"defined","version":"1.0.0","description":"return the first argument that is `!== undefined`","main":"index.js","directories":{"example":"example","test":"test"},"dependencies":{},"devDependencies":{"tape":"~3.5.0"},"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]}},"repository":{"type":"git","url":"git://github.com/substack/defined.git"},"homepage":"https://github.com/substack/defined","keywords":["undefined","short-circuit","||","or","//","defined-or"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"3a46c81d39b5f94c0c17c47638939af2528520f3","bugs":{"url":"https://github.com/substack/defined/issues"},"_id":"defined@1.0.0","_shasum":"c98d9bcef75674188e110969151199e39b1fa693","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"c98d9bcef75674188e110969151199e39b1fa693","tarball":"https://registry.npmjs.org/defined/-/defined-1.0.0.tgz"}}},"readme":"# defined\n\nreturn the first argument that is `!== undefined`\n\n[](http://ci.testling.com/substack/defined)\n\n[](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","maintainers":[{"name":"substack","email":"mail@substack.net"}],"time":{"modified":"2015-04-08T11:28:28.088Z","created":"2012-11-26T04:53:25.352Z","0.0.0":"2012-11-26T04:53:26.402Z","1.0.0":"2015-04-08T11:28:28.088Z"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git://github.com/substack/defined.git"},"users":{"julien-f":true,"simplyianm":true,"kontrax":true,"irnnr":true},"homepage":"https://github.com/substack/defined","keywords":["undefined","short-circuit","||","or","//","defined-or"],"license":"MIT","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/defined/issues"},"_attachments":{},"_etag":"\"40DYO53KZFEFFH9CD0TTV65JP\""}