Neurological Phenomenon Multiplexer

    nanoclone

    1.0.0 • Public • Published

    nanoclone

    license npm
    Only 300B to deep clone JavaScript objects

    Is it small enough?

    See the size of the most popular clone npm package with 250M+ downloads image
    And nanoclone size:
    image

    Supported

    • [x] Primitives
    • [x] Arrays
    • [x] Plain objects
    • [x] DOM Nodes
    • [x] Date instances
    • [x] RegExp instances
    • [x] Maps
    • [x] Sets
    • [x] Circular structures

    Installation

    yarn add nanoclone
    npm install nanoclone
    

    Usage

    import clone from 'nanoclone'
    
    let a = {
      num: 2,
      arr: [1, 2, 3],
      nested: {
        obj: {
          a: 0
        }
      }
    }
    
    let b = clone(a)

    License

    MIT

    Install

    npm i nanoclone

    DownloadsWeekly Downloads

    1,254,596

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    7.11 kB

    Total Files

    9

    Last publish

    Collaborators

    • kelin2025