Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Apr 14, 2016
1 parent 352c572 commit 3a5e347
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var isArray = require('is-array');
var isWindow = require('is-window');
var isObject = require('is-object');
var isFunction = require('is-function');


Expand All @@ -20,8 +19,9 @@ module.exports = function (obj) {
return false;
}

obj = Object(obj);

var length = isObject(obj) && 'length' in obj && obj.length;
var length = 'length' in obj && obj.length;

if (obj.nodeType === 1 && length) {
return true;
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "is-array-like",
"version": "1.0.6",
"version": "1.1.0",
"description": "Checks if the given value is an array or array-like object.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -45,7 +45,6 @@
"dependencies": {
"is-array": "^1.0.1",
"is-function": "^1.0.1",
"is-object": "^1.0.1",
"is-window": "^1.0.1"
}
}
4 changes: 3 additions & 1 deletion test/spec/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe('is-array-like', function () {

expect(isArrayLike(1)).to.be.false;

expect(isArrayLike('1')).to.be.false;
expect(isArrayLike('1')).to.be.true;

expect(isArrayLike('abc')).to.be.true;

expect(isArrayLike(true)).to.be.false;

Expand Down

0 comments on commit 3a5e347

Please sign in to comment.