Sha256: d57f2c6210d841f22b0b7b2443396b50210be9cc96dc1ca0c5e012b8556ec182
Contents?: true
Size: 429 Bytes
Versions: 368
Compression:
Stored size: 429 Bytes
Contents
'use strict' var fs = require('fs') module.exports = clone(fs) function clone (obj) { if (obj === null || typeof obj !== 'object') return obj if (obj instanceof Object) var copy = { __proto__: obj.__proto__ } else var copy = Object.create(null) Object.getOwnPropertyNames(obj).forEach(function (key) { Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) }) return copy }
Version data entries
368 entries across 99 versions & 17 rubygems