-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
88 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
"rules": { | ||
"consistent-return": 1, | ||
"indent": [2, 4], | ||
"sort-keys": 0, | ||
}, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
'use strict'; | ||
|
||
module.exports = function defined() { | ||
for (var i = 0; i < arguments.length; i++) { | ||
if (typeof arguments[i] !== 'undefined') { | ||
return arguments[i]; | ||
} | ||
} | ||
for (var i = 0; i < arguments.length; i++) { | ||
if (typeof arguments[i] !== 'undefined') { | ||
return arguments[i]; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
{ | ||
"name": "defined", | ||
"version": "1.0.0", | ||
"description": "return the first argument that is `!== undefined`", | ||
"main": "index.js", | ||
"directories": { | ||
"example": "example", | ||
"test": "test" | ||
}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^21.0.0", | ||
"aud": "^2.0.1", | ||
"eslint": "=8.8.0", | ||
"tape": "^5.6.1" | ||
}, | ||
"scripts": { | ||
"lint": "eslint --ext=js,mjs .", | ||
"pretest": "npm run lint", | ||
"tests-only": "tape 'test/**/*.js'", | ||
"test": "npm run tests-only", | ||
"posttest": "aud --production" | ||
}, | ||
"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" | ||
"name": "defined", | ||
"version": "1.0.0", | ||
"description": "return the first argument that is `!== undefined`", | ||
"main": "index.js", | ||
"directories": { | ||
"example": "example", | ||
"test": "test" | ||
}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^21.0.0", | ||
"aud": "^2.0.1", | ||
"eslint": "=8.8.0", | ||
"tape": "^5.6.1" | ||
}, | ||
"scripts": { | ||
"lint": "eslint --ext=js,mjs .", | ||
"pretest": "npm run lint", | ||
"tests-only": "tape 'test/**/*.js'", | ||
"test": "npm run tests-only", | ||
"posttest": "aud --production" | ||
}, | ||
"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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters