Sha256: 76292aad014f0dbf94c3678b04a74eeca83dc296eccf5e2cc67a18fd7ca2dcb2
Contents?: true
Size: 475 Bytes
Versions: 66
Compression:
Stored size: 475 Bytes
Contents
var isObject = require('./_is-object'); var isArray = require('./_is-array'); var SPECIES = require('./_wks')('species'); module.exports = function (original) { var C; if (isArray(original)) { C = original.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; };
Version data entries
66 entries across 30 versions & 8 rubygems