Skip to content

Commit

Permalink
clone optimization (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
bali182 authored and sdgluck committed Mar 28, 2017
1 parent 9887cfb commit c9d9939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = function mewt (target) {
let isA = Array.isArray(target)
, multiRet = 'push pop shift unshift'
, clone = v => (v = isA ? [].concat(v) : Object.assign({}, v), v)
, clone = isA ? v => [].concat(v) : v => Object.assign({}, v)

let override = prop => (...args) => {
let cl = clone(target)
Expand Down

0 comments on commit c9d9939

Please sign in to comment.