pax_global_header00006660000000000000000000000064126322471050014514gustar00rootroot0000000000000052 comment=2a23a281f369e9ae06394c0fb4d2381355a6ba33 isarray-1.0.0/000077500000000000000000000000001263224710500131645ustar00rootroot00000000000000isarray-1.0.0/.gitignore000066400000000000000000000000151263224710500151500ustar00rootroot00000000000000node_modules isarray-1.0.0/.travis.yml000066400000000000000000000000601263224710500152710ustar00rootroot00000000000000language: node_js node_js: - "0.8" - "0.10" isarray-1.0.0/Makefile000066400000000000000000000000671263224710500146270ustar00rootroot00000000000000 test: @node_modules/.bin/tape test.js .PHONY: test isarray-1.0.0/README.md000066400000000000000000000035421263224710500144470ustar00rootroot00000000000000 # isarray `Array#isArray` for older browsers. [![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) [![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) [![browser support](https://ci.testling.com/juliangruber/isarray.png) ](https://ci.testling.com/juliangruber/isarray) ## Usage ```js var isArray = require('isarray'); console.log(isArray([])); // => true console.log(isArray({})); // => false ``` ## Installation With [npm](http://npmjs.org) do ```bash $ npm install isarray ``` Then bundle for the browser with [browserify](https://github.com/substack/browserify). With [component](http://component.io) do ```bash $ component install juliangruber/isarray ``` ## License (MIT) Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 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. isarray-1.0.0/component.json000066400000000000000000000007261263224710500160660ustar00rootroot00000000000000{ "name" : "isarray", "description" : "Array#isArray for older browsers", "version" : "0.0.1", "repository" : "juliangruber/isarray", "homepage": "https://github.com/juliangruber/isarray", "main" : "index.js", "scripts" : [ "index.js" ], "dependencies" : {}, "keywords": ["browser","isarray","array"], "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "license": "MIT" } isarray-1.0.0/index.js000066400000000000000000000002041263224710500146250ustar00rootroot00000000000000var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; isarray-1.0.0/package.json000066400000000000000000000016761263224710500154640ustar00rootroot00000000000000{ "name": "isarray", "description": "Array#isArray for older browsers", "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/juliangruber/isarray.git" }, "homepage": "https://github.com/juliangruber/isarray", "main": "index.js", "dependencies": {}, "devDependencies": { "tape": "~2.13.4" }, "keywords": [ "browser", "isarray", "array" ], "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "license": "MIT", "testling": { "files": "test.js", "browsers": [ "ie/8..latest", "firefox/17..latest", "firefox/nightly", "chrome/22..latest", "chrome/canary", "opera/12..latest", "opera/next", "safari/5.1..latest", "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" ] }, "scripts": { "test": "tape test.js" } } isarray-1.0.0/test.js000066400000000000000000000005001263224710500144740ustar00rootroot00000000000000var isArray = require('./'); var test = require('tape'); test('is array', function(t){ t.ok(isArray([])); t.notOk(isArray({})); t.notOk(isArray(null)); t.notOk(isArray(false)); var obj = {}; obj[0] = true; t.notOk(isArray(obj)); var arr = []; arr.foo = 'bar'; t.ok(isArray(arr)); t.end(); });