From c877c9a5c05f020f345beef2b6f8e9905f9cb6ed Mon Sep 17 00:00:00 2001 From: Luca Ban Date: Tue, 1 Mar 2022 17:42:19 +0900 Subject: [PATCH] fix readme typos --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e1fded..651d6dc 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ import { pick } from 'filter-anything' const squirtle = { id: '007', name: 'Squirtle', type: 'water' } -const withoutId = pick(squirtle, ['name', 'type']) +const newObject = pick(squirtle, ['name', 'type']) // returns { name: 'Squirtle', type: 'water' } ``` @@ -54,7 +54,7 @@ import { omit } from 'filter-anything' const squirtle = { id: '007', name: 'Squirtle', type: 'water' } -const withoutId = omit(squirtle, ['name', 'type']) +const withoutId = omit(squirtle, ['id']) // returns { name: 'Squirtle', type: 'water' } ``` @@ -91,8 +91,8 @@ Yes! You can also work with wildcards by using `*` in the path. ```js const doc = { - '123': { keep: '📌', discard: '✂️' }, - '456': { keep: '📌', discard: '✂️' }, + 123: { keep: '📌', discard: '✂️' }, + 456: { keep: '📌', discard: '✂️' }, } // use wildcard * omit(doc, ['*.discard'])