Skip to content

Commit 7e6848b

Browse files
committed
adding doc
1 parent 3797642 commit 7e6848b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ or
1313

1414
`npm i ali-utils --save`
1515

16+
**IMPORTANT NOTE**: I'm still writing the core libraries, some libs are still unfinished.
17+
1618
## Use
1719
**a few examples here:**
1820

19-
'Copy' creates a new object from another object, so changing the copy object
21+
**'Copy'** creates a new object from another object, so changing the copy object
2022
wont change the origin one
2123
```js
2224
import {Copy} from 'ali-utils'
@@ -40,6 +42,25 @@ var jane = Copy(john, {
4042
})
4143
```
4244

45+
**'Exclude'** is a function which removes the specified properties.
46+
write the names of the properties you want to exclude inside an array.
47+
48+
```js
49+
import {Exclude} from 'ali-utils'
50+
51+
var myData = {
52+
name: 'john',
53+
lastName: 'doe',
54+
facebook_username: 'john_doe',
55+
facebook_password: 'johndoe123'
56+
}
57+
58+
var securedData = Exclude(myData, ['facebook_password'])
59+
60+
console.log(securedData)
61+
```
62+
63+
4364
## License
4465

4566
MIT License

0 commit comments

Comments
 (0)