Skip to content

Commit

Permalink
De-lint isArguments().
Browse files Browse the repository at this point in the history
jshint really didn't like the original version of isArguments, and there
was a call to `toString` that should have been `_toString`.
  • Loading branch information
cscott committed Feb 14, 2014
1 parent d1f8716 commit 85dc5ed
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@
// can be replaced with require('is-arguments') if we ever use a build process instead
var isArguments = function isArguments(value) {
var str = _toString.call(value);
var isArguments = str === '[object Arguments]';
if (!isArguments) {
isArguments = str !== '[object Array]'
&& value !== null
&& typeof value === 'object'
&& typeof value.length === 'number'
&& value.length >= 0
&& toString.call(value.callee) === '[object Function]';
var result = str === '[object Arguments]';
if (!result) {
result = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
_toString.call(value.callee) === '[object Function]';
}
return isArguments;
return result;
};

var ES = {
Expand Down

0 comments on commit 85dc5ed

Please sign in to comment.