Blame view

node_modules/es5-ext/object/copy.js 214 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
  'use strict';
  
  var assign = require('./assign')
    , value  = require('./valid-value');
  
  module.exports = function (obj) {
  	var copy = Object(value(obj));
  	if (copy !== obj) return copy;
  	return assign({}, obj);
  };