aboutsummaryrefslogtreecommitdiff
path: root/node_modules/defined
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/defined')
-rw-r--r--node_modules/defined/.travis.yml4
-rw-r--r--node_modules/defined/LICENSE18
-rw-r--r--node_modules/defined/example/defined.js4
-rw-r--r--node_modules/defined/index.js5
-rw-r--r--node_modules/defined/package.json46
-rw-r--r--node_modules/defined/readme.markdown53
-rw-r--r--node_modules/defined/test/def.js22
-rw-r--r--node_modules/defined/test/falsy.js9
8 files changed, 0 insertions, 161 deletions
diff --git a/node_modules/defined/.travis.yml b/node_modules/defined/.travis.yml
deleted file mode 100644
index 895dbd36..00000000
--- a/node_modules/defined/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.6
- - 0.8
diff --git a/node_modules/defined/LICENSE b/node_modules/defined/LICENSE
deleted file mode 100644
index ee27ba4b..00000000
--- a/node_modules/defined/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-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.
diff --git a/node_modules/defined/example/defined.js b/node_modules/defined/example/defined.js
deleted file mode 100644
index 7b5d982f..00000000
--- a/node_modules/defined/example/defined.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var defined = require('../');
-var opts = { y : false, w : 4 };
-var x = defined(opts.x, opts.y, opts.w, 8);
-console.log(x);
diff --git a/node_modules/defined/index.js b/node_modules/defined/index.js
deleted file mode 100644
index f8a22198..00000000
--- a/node_modules/defined/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = function () {
- for (var i = 0; i < arguments.length; i++) {
- if (arguments[i] !== undefined) return arguments[i];
- }
-};
diff --git a/node_modules/defined/package.json b/node_modules/defined/package.json
deleted file mode 100644
index 7f699760..00000000
--- a/node_modules/defined/package.json
+++ /dev/null
@@ -1,46 +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.0 ],
- "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"
-}
diff --git a/node_modules/defined/readme.markdown b/node_modules/defined/readme.markdown
deleted file mode 100644
index 9616195d..00000000
--- a/node_modules/defined/readme.markdown
+++ /dev/null
@@ -1,53 +0,0 @@
-# defined
-
-return the first argument that is `!== undefined`
-
-[![browser support](http://ci.testling.com/substack/defined.png)](http://ci.testling.com/substack/defined)
-
-[![build status](https://secure.travis-ci.org/substack/defined.png)](http://travis-ci.org/substack/defined)
-
-Most of the time when I chain together `||`s, I actually just want the first
-item that is not `undefined`, not the first non-falsy item.
-
-This module is like the defined-or (`//`) operator in perl 5.10+.
-
-# example
-
-``` js
-var defined = require('defined');
-var opts = { y : false, w : 4 };
-var x = defined(opts.x, opts.y, opts.w, 100);
-console.log(x);
-```
-
-```
-$ node example/defined.js
-false
-```
-
-The return value is `false` because `false` is the first item that is
-`!== undefined`.
-
-# methods
-
-``` js
-var defined = require('defined')
-```
-
-## var x = defined(a, b, c...)
-
-Return the first item in the argument list `a, b, c...` that is `!== undefined`.
-
-If all the items are `=== undefined`, return undefined.
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install defined
-```
-
-# license
-
-MIT
diff --git a/node_modules/defined/test/def.js b/node_modules/defined/test/def.js
deleted file mode 100644
index 48da5171..00000000
--- a/node_modules/defined/test/def.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var defined = require('../');
-var test = require('tape');
-
-test('defined-or', function (t) {
- var u = undefined;
-
- t.equal(defined(), u, 'empty arguments');
- t.equal(defined(u), u, '1 undefined');
- t.equal(defined(u, u), u, '2 undefined');
- t.equal(defined(u, u, u, u), u, '4 undefineds');
-
- t.equal(defined(undefined, false, true), false, 'false[0]');
- t.equal(defined(false, true), false, 'false[1]');
- t.equal(defined(undefined, 0, true), 0, 'zero[0]');
- t.equal(defined(0, true), 0, 'zero[1]');
-
- t.equal(defined(3, undefined, 4), 3, 'first arg');
- t.equal(defined(undefined, 3, 4), 3, 'second arg');
- t.equal(defined(undefined, undefined, 3), 3, 'third arg');
-
- t.end();
-});
diff --git a/node_modules/defined/test/falsy.js b/node_modules/defined/test/falsy.js
deleted file mode 100644
index 6b7d623f..00000000
--- a/node_modules/defined/test/falsy.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var test = require('tape');
-var defined = require('../');
-
-test('falsy', function (t) {
- t.plan(1);
- var opts = { y : false, w : 4 };
- var x = defined(opts.x, opts.y, opts.w, 8);
- t.equal(x, false);
-});