|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
422 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var toStr = Object.prototype.toString;
|
|---|
| 4 |
|
|---|
| 5 | module.exports = function isArguments(value) {
|
|---|
| 6 | var str = toStr.call(value);
|
|---|
| 7 | var isArgs = str === '[object Arguments]';
|
|---|
| 8 | if (!isArgs) {
|
|---|
| 9 | isArgs = str !== '[object Array]' &&
|
|---|
| 10 | value !== null &&
|
|---|
| 11 | typeof value === 'object' &&
|
|---|
| 12 | typeof value.length === 'number' &&
|
|---|
| 13 | value.length >= 0 &&
|
|---|
| 14 | toStr.call(value.callee) === '[object Function]';
|
|---|
| 15 | }
|
|---|
| 16 | return isArgs;
|
|---|
| 17 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.