source: imaps-frontend/node_modules/es-abstract/helpers/isStringOrHole.js

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
RevLine 
[d565449]1'use strict';
2
3// TODO: semver-major: remove
4
5var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false
6
7module.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.