All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.helpers.isStringOrHole.js Maven / Gradle / Ivy

There is a newer version: 1.22.3
Show newest version
'use strict';

var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false

module.exports = function isStringOrHole(item, index, arr) {
	return typeof item === 'string' || (canDistinguishSparseFromUndefined ? !(index in arr) : typeof item === 'undefined');
};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy