main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
338 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | // TODO: semver-major: remove
|
---|
4 |
|
---|
5 | var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false
|
---|
6 |
|
---|
7 | module.exports = function isStringOrHole(item, index, arr) {
|
---|
8 | return typeof item === 'string' || (canDistinguishSparseFromUndefined ? !(index in arr) : typeof item === 'undefined');
|
---|
9 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.