mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
14 lines
503 B
JavaScript
14 lines
503 B
JavaScript
|
var fails = require('../internals/fails');
|
||
|
var classof = require('../internals/classof-raw');
|
||
|
|
||
|
var split = ''.split;
|
||
|
|
||
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||
|
module.exports = fails(function () {
|
||
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||
|
// eslint-disable-next-line no-prototype-builtins
|
||
|
return !Object('z').propertyIsEnumerable(0);
|
||
|
}) ? function (it) {
|
||
|
return classof(it) == 'String' ? split.call(it, '') : Object(it);
|
||
|
} : Object;
|