Skip to content

clone

Basic usage

Creates a shallow copy of the given object/value.

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