1 | asobj
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
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 |
|
34 |
|
35 |
|
36 |
|
37 | <a name="description"></a>
|
38 |
|
39 | Object utiltify
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | <a name="overview"></a>
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | <a name="sections"></a>
|
54 |
|
55 |
|
56 |
|
57 | <a name="section-doc-guides-01-installation-md"></a>
|
58 |
|
59 | Installation
|
60 | -----
|
61 |
|
62 | ```bash
|
63 | $ npm install asobj --save
|
64 | ```
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | <a name="section-doc-guides-02-usage-md"></a>
|
72 |
|
73 | Usage
|
74 | ---------
|
75 |
|
76 | ```javascript
|
77 | 'use strict'
|
78 |
|
79 | const { 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 |
|
95 |
|
96 |
|
97 |
|
98 | <a name="section-doc-guides-03-functions-md"></a>
|
99 |
|
100 | Functions
|
101 | ---------
|
102 |
|
103 | Available 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 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | <a name="license"></a>
|
123 |
|
124 | License
|
125 | -------
|
126 | This software is released under the [MIT License](https://github.com/a-labo/asobj/blob/master/LICENSE).
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 | <a name="links"></a>
|
133 |
|
134 | Links
|
135 | ------
|
136 |
|
137 | + [a-labo][a_labo_url]
|
138 |
|
139 | [a_labo_url]: https://github.com/a-labo
|
140 |
|
141 |
|