component-clone

0.2.3 • Public • Published

clone

Object clone supporting date, regexp, array and object types.

Example

var obj = clone({
  a: 'b',
  c: [
    new Date(),
    'tobi',
    'jane'
  ]
})

API

clone(obj)

Clones obj recursively and returns it.

License

MIT

/component-clone/

    Package Sidebar

    Install

    npm i component-clone

    Weekly Downloads

    68,287

    Version

    0.2.3

    License

    none

    Last publish

    Collaborators

    • dfcreative
    • jongleberry
    • tootallnate
    • tjholowaychuk
    • juliangruber
    • yields
    • ianstormtaylor
    • timoxley
    • mattmueller
    • jonathanong
    • queckezz
    • anthonyshort
    • nami-doc
    • dominicbarnes
    • clintwood
    • thehydroimpulse
    • stephenmathieson
    • trevorgerhardt
    • timaschew
    • hughsk