You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.8 KiB

4 years ago
  1. # isarray
  2. `Array#isArray` for older browsers.
  3. [![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
  4. [![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
  5. [![browser support](https://ci.testling.com/juliangruber/isarray.png)
  6. ](https://ci.testling.com/juliangruber/isarray)
  7. ## Usage
  8. ```js
  9. var isArray = require('isarray');
  10. console.log(isArray([])); // => true
  11. console.log(isArray({})); // => false
  12. ```
  13. ## Installation
  14. With [npm](https://npmjs.org) do
  15. ```bash
  16. $ npm install isarray
  17. ```
  18. Then bundle for the browser with
  19. [browserify](https://github.com/substack/node-browserify).
  20. ## License
  21. (MIT)
  22. Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
  23. Permission is hereby granted, free of charge, to any person obtaining a copy of
  24. this software and associated documentation files (the "Software"), to deal in
  25. the Software without restriction, including without limitation the rights to
  26. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  27. of the Software, and to permit persons to whom the Software is furnished to do
  28. so, subject to the following conditions:
  29. The above copyright notice and this permission notice shall be included in all
  30. copies or substantial portions of the Software.
  31. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  32. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  33. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  34. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  35. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  36. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  37. SOFTWARE.