-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kinvil_hsiao
committed
Mar 30, 2017
1 parent
0d96ff9
commit b239727
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
# node-objs | ||
deal with js object | ||
A light weight module to deal with js object. | ||
|
||
[![Build Status](https://travis-ci.org/kinvil/node-objs.svg?branch=master)](https://travis-ci.org/kinvil/node-objs) | ||
[![Coverage Status](https://coveralls.io/repos/github/kinvil/node-objs/badge.svg?branch=master)](https://coveralls.io/github/kinvil/node-objs?branch=master) | ||
|
||
|
||
## install | ||
``` | ||
npm install --save node-objs | ||
``` | ||
npm install node-objs --save | ||
``` | ||
|
||
## example | ||
|
||
``` | ||
import { clone, isEqual } from 'node-objs' | ||
const obj = { foo: 'bar' } | ||
const newObj = clone(obj) | ||
console.log(newObj) // { foo: 'bar' } | ||
obj === newObj // false | ||
isEqual(obj, newObj) // true | ||
obj.foo = 'text' // { foo: 'text' } | ||
console.log(newObj) // { foo: 'bar' } | ||
isEqual(obj, newObj) // false | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters