UNPKG

3.35 kBMarkdownView Raw
1asobj
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![npm Version][bd_npm_shield_url]][bd_npm_url]
15[![JS Standard][bd_standard_shield_url]][bd_standard_url]
16
17[bd_repo_url]: https://github.com/a-labo/asobj
18[bd_travis_url]: http://travis-ci.org/a-labo/asobj
19[bd_travis_shield_url]: http://img.shields.io/travis/a-labo/asobj.svg?style=flat
20[bd_travis_com_url]: http://travis-ci.com/a-labo/asobj
21[bd_travis_com_shield_url]: https://api.travis-ci.com/a-labo/asobj.svg?token=
22[bd_license_url]: https://github.com/a-labo/asobj/blob/master/LICENSE
23[bd_codeclimate_url]: http://codeclimate.com/github/a-labo/asobj
24[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/a-labo/asobj.svg?style=flat
25[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/a-labo/asobj.svg?style=flat
26[bd_gemnasium_url]: https://gemnasium.com/a-labo/asobj
27[bd_gemnasium_shield_url]: https://gemnasium.com/a-labo/asobj.svg
28[bd_npm_url]: http://www.npmjs.org/package/asobj
29[bd_npm_shield_url]: http://img.shields.io/npm/v/asobj.svg?style=flat
30[bd_standard_url]: http://standardjs.com/
31[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
32
33<!-- Badge End -->
34
35
36<!-- Description Start -->
37<a name="description"></a>
38
39Object utiltify
40
41<!-- Description End -->
42
43
44<!-- Overview Start -->
45<a name="overview"></a>
46
47
48
49<!-- Overview End -->
50
51
52<!-- Sections Start -->
53<a name="sections"></a>
54
55<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
56
57<a name="section-doc-guides-01-installation-md"></a>
58
59Installation
60-----
61
62```bash
63$ npm install asobj --save
64```
65
66
67<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
68
69<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
70
71<a name="section-doc-guides-02-usage-md"></a>
72
73Usage
74---------
75
76```javascript
77'use strict'
78
79const { clone } = require('asobj')
80
81{
82 let obj = clone({
83 foo: 'bar',
84 baz: 'quz'
85 }, {
86 without: 'baz'
87 })
88 console.log(obj) // -> { foo: 'bar' }
89}
90
91```
92
93
94<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
95
96<!-- Section from "doc/guides/03.Functions.md.hbs" Start -->
97
98<a name="section-doc-guides-03-functions-md"></a>
99
100Functions
101---------
102
103Available functions
104
105| Signature | Description |
106| ---- | ----------- |
107| `.assign() -> Object` | Assign object |
108| `.cleanup(values) -> Object` | Delete undefined properties. |
109| `.clone(src, options) -> Object` | Clone a object |
110| `.deepEqual(obj1, obj2) -> boolean` | Compare object deeply |
111| `.dig(src, keys) -> *` | Dig object props |
112| `.shallowEqual(obj1, obj2) -> boolean` | Performs equality by iterating through keys on an object and returning false |
113
114
115<!-- Section from "doc/guides/03.Functions.md.hbs" End -->
116
117
118<!-- Sections Start -->
119
120
121<!-- LICENSE Start -->
122<a name="license"></a>
123
124License
125-------
126This software is released under the [MIT License](https://github.com/a-labo/asobj/blob/master/LICENSE).
127
128<!-- LICENSE End -->
129
130
131<!-- Links Start -->
132<a name="links"></a>
133
134Links
135------
136
137+ [a-labo][a_labo_url]
138
139[a_labo_url]: https://github.com/a-labo
140
141<!-- Links End -->