Skip to content

clone

Creates a shallow copy of the given object/value.

328 bytes

Usage

Creates a shallow copy of the given object/value.

import * as _ from 'radashi'
const ra = {
name: 'Ra',
power: 100,
}
const gods = [ra]
_.clone(ra) // => copy of ra
_.clone(gods) // => copy of gods