42d592b1235c6fa140015bbf6172e5b1e9db0ab654e62a1a599c995dba4e18499cd3b3e5c157d3af39254342174e89631446bedd9735cd852fa32fc78c709c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # is-arguments <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
  2. [![github actions][actions-image]][actions-url]
  3. [![coverage][codecov-image]][codecov-url]
  4. [![dependency status][deps-svg]][deps-url]
  5. [![dev dependency status][dev-deps-svg]][dev-deps-url]
  6. [![License][license-image]][license-url]
  7. [![Downloads][downloads-image]][downloads-url]
  8. [![npm badge][npm-badge-png]][package-url]
  9. Is this an arguments object? It's a harder question than you think.
  10. ## Example
  11. ```js
  12. var isArguments = require('is-arguments');
  13. var assert = require('assert');
  14. assert.equal(isArguments({}), false);
  15. assert.equal(isArguments([]), false);
  16. (function () {
  17. assert.equal(isArguments(arguments), true);
  18. }())
  19. ```
  20. ## Caveats
  21. If you have modified an actual `arguments` object by giving it a `Symbol.toStringTag` property, then this package will return `false`.
  22. ## Tests
  23. Simply clone the repo, `npm install`, and run `npm test`
  24. [package-url]: https://npmjs.org/package/is-arguments
  25. [npm-version-svg]: https://versionbadg.es/inspect-js/is-arguments.svg
  26. [deps-svg]: https://david-dm.org/inspect-js/is-arguments.svg
  27. [deps-url]: https://david-dm.org/inspect-js/is-arguments
  28. [dev-deps-svg]: https://david-dm.org/inspect-js/is-arguments/dev-status.svg
  29. [dev-deps-url]: https://david-dm.org/inspect-js/is-arguments#info=devDependencies
  30. [npm-badge-png]: https://nodei.co/npm/is-arguments.png?downloads=true&stars=true
  31. [license-image]: https://img.shields.io/npm/l/is-arguments.svg
  32. [license-url]: LICENSE
  33. [downloads-image]: https://img.shields.io/npm/dm/is-arguments.svg
  34. [downloads-url]: https://npm-stat.com/charts.html?package=is-arguments
  35. [codecov-image]: https://codecov.io/gh/inspect-js/is-arguments/branch/main/graphs/badge.svg
  36. [codecov-url]: https://app.codecov.io/gh/inspect-js/is-arguments/
  37. [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-arguments
  38. [actions-url]: https://github.com/inspect-js/is-arguments/actions