@vect/object-mapper
Advanced tools
Comparing version
{ | ||
"name": "@vect/object-mapper", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "A debugging tool", | ||
@@ -33,3 +33,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/vect#readme", | ||
"gitHead": "64dd0e6461b71d49b41809f8ae7f3d7112f582e6" | ||
"gitHead": "d54a37609a91c19acb3695ff9d2e67a12775aefe" | ||
} |
@@ -1,2 +0,2 @@ | ||
# @vect/object-mapper | ||
# @vect/object-fn | ||
@@ -13,8 +13,8 @@ [![npm version][badge-npm-version]][url-npm] | ||
[//]: <> (Shields) | ||
[badge-npm-version]: https://flat.badgen.net/npm/v/@vect/object-mapper | ||
[badge-npm-download-monthly]: https://flat.badgen.net/npm/dm/@vect/object-mapper | ||
[badge-npm-download-total]:https://flat.badgen.net/npm/dt/@vect/object-mapper | ||
[badge-npm-dependents]: https://flat.badgen.net/npm/dependents/@vect/object-mapper | ||
[badge-npm-license]: https://flat.badgen.net/npm/license/@vect/object-mapper | ||
[badge-pp-install-size]: https://flat.badgen.net/packagephobia/install/@vect/object-mapper | ||
[badge-npm-version]: https://flat.badgen.net/npm/v/@vect/object-fn | ||
[badge-npm-download-monthly]: https://flat.badgen.net/npm/dm/@vect/object-fn | ||
[badge-npm-download-total]:https://flat.badgen.net/npm/dt/@vect/object-fn | ||
[badge-npm-dependents]: https://flat.badgen.net/npm/dependents/@vect/object-fn | ||
[badge-npm-license]: https://flat.badgen.net/npm/license/@vect/object-fn | ||
[badge-pp-install-size]: https://flat.badgen.net/packagephobia/install/@vect/object-fn | ||
[badge-github-last-commit]: https://flat.badgen.net/github/last-commit/hoyeungw/vect | ||
@@ -24,4 +24,4 @@ [badge-github-commit-count]: https://flat.badgen.net/github/commits/hoyeungw/vect | ||
[//]: <> (Link) | ||
[url-npm]: https://npmjs.org/package/@vect/object-mapper | ||
[url-pp]: https://packagephobia.now.sh/result?p=@vect/object-mapper | ||
[url-npm]: https://npmjs.org/package/@vect/object-fn | ||
[url-pp]: https://packagephobia.now.sh/result?p=@vect/object-fn | ||
[url-github]: https://github.com/hoyeungw/vect | ||
@@ -33,3 +33,3 @@ | ||
```console | ||
$ npm install @vect/object-mapper | ||
$ npm install @vect/object-fn | ||
``` | ||
@@ -39,3 +39,3 @@ | ||
- **mapper** map object values and return a new object | ||
- **fn** map object values and return a new object | ||
- **mutate** map object values and return the object itself | ||
@@ -47,3 +47,3 @@ - **mapKeys** map object keys and return a new object | ||
```js | ||
import { mapper, mutate, mapKeys, mapEntries } from '@vect/object-mapper' | ||
import { fn, mutate, mapKeys, mapEntries } from '@vect/object-fn' | ||
@@ -57,3 +57,3 @@ const ob = { | ||
mapper(ob, value => value.length) | ||
fn(ob, value => value.length) | ||
mapKeys(ob, key => key.slice(0, 4)) | ||
@@ -60,0 +60,0 @@ mapEntries(ob, ([key, value], i) => [`${key}_${i}`, value.length]) |
5327
-1.04%