Projekt

Obecné

Profil

Stáhnout (1.57 KB) Statistiky
| Větev: | Revize:
1
#is-arguments <sup>[![Version Badge][2]][1]</sup>
2

    
3
[![Build Status][3]][4]
4
[![dependency status][5]][6]
5
[![dev dependency status][7]][8]
6
[![License][license-image]][license-url]
7
[![Downloads][downloads-image]][downloads-url]
8

    
9
[![npm badge][11]][1]
10

    
11
[![browser support][9]][10]
12

    
13
Is this an arguments object? It's a harder question than you think.
14

    
15
## Example
16

    
17
```js
18
var isArguments = require('is-arguments');
19
var assert = require('assert');
20

    
21
assert.equal(isArguments({}), false);
22
assert.equal(isArguments([]), false);
23
(function () {
24
	assert.equal(isArguments(arguments), true);
25
}())
26
```
27

    
28
## Caveats
29
If you have modified an actual `arguments` object by giving it a `Symbol.toStringTag` property, then this package will return `false`.
30

    
31
## Tests
32
Simply clone the repo, `npm install`, and run `npm test`
33

    
34
[1]: https://npmjs.org/package/is-arguments
35
[2]: http://versionbadg.es/ljharb/is-arguments.svg
36
[3]: https://travis-ci.org/ljharb/is-arguments.svg
37
[4]: https://travis-ci.org/ljharb/is-arguments
38
[5]: https://david-dm.org/ljharb/is-arguments.svg
39
[6]: https://david-dm.org/ljharb/is-arguments
40
[7]: https://david-dm.org/ljharb/is-arguments/dev-status.svg
41
[8]: https://david-dm.org/ljharb/is-arguments#info=devDependencies
42
[9]: https://ci.testling.com/ljharb/is-arguments.png
43
[10]: https://ci.testling.com/ljharb/is-arguments
44
[11]: https://nodei.co/npm/is-arguments.png?downloads=true&stars=true
45
[license-image]: http://img.shields.io/npm/l/is-arguments.svg
46
[license-url]: LICENSE
47
[downloads-image]: http://img.shields.io/npm/dm/is-arguments.svg
48
[downloads-url]: http://npm-stat.com/charts.html?package=is-arguments
49

    
(7-7/10)