Sha256: 8784c463fd79aea42f5a4a33f8d07734900ee0ea2adba907b6ab7f08623388a4
Contents?: true
Size: 352 Bytes
Versions: 40
Compression:
Stored size: 352 Bytes
Contents
// https://github.com/DavidBruant/Map-Set.prototype.toJSON var forOf = require('./$.for-of') , classof = require('./$.classof'); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); var arr = []; forOf(this, false, arr.push, arr); return arr; }; };
Version data entries
40 entries across 18 versions & 7 rubygems