3.0.2 • Published 8 months ago

stringify-clone v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Stringify Clone

Wrapper for fast object cloning using JSON.parse & JSON.stringify

license release semantic

IMPORTANT:

THIS IS A ONE LINE PACKAGE, THERE IS NO REASON FOR YOU TO USE IT!

Notes:

  • cannot clone RegExp (returns {})
  • NaN values will be converted to null
  • Date objects will be converted to ISO strings (equivalent of running Date.toISOString())
    • you can reconstruct the Date by calling new Date(string)

Install

npm install stringify-clone

Usage

API

clone()

const clone = require('stringify-clone')

clone({
  foo: 'bar'
})

Author: Ahmad Nassri  Twitter: @AhmadNassri

3.0.2

8 months ago

3.0.1

1 year ago

3.0.0

2 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.7

3 years ago

2.0.8

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

5 years ago

2.0.0

7 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago