X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fcore-js%2Flibrary%2Fmodules%2F_collection-to-json.js;fp=node_modules%2Fcore-js%2Flibrary%2Fmodules%2F_collection-to-json.js;h=ce0282f6bb8db2bf90ce1e56b9e6cd5ba464dd5c;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/core-js/library/modules/_collection-to-json.js b/node_modules/core-js/library/modules/_collection-to-json.js new file mode 100644 index 000000000..ce0282f6b --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof') + , from = require('./_array-from-iterable'); +module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; \ No newline at end of file