@smakss/search
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "@smakss/search", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Search through array and/or objects for sepcific keyword.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -41,5 +41,6 @@ # Search | ||
**Passing an object:** | ||
If the matching element was in object it will return the whole object. | ||
### Passing an object | ||
If the matching element was in object it will return the whole object: | ||
```js | ||
@@ -53,3 +54,3 @@ const obj = { name: "John", lastName: "Doe" }; | ||
**Passing an array:** | ||
### Passing an array | ||
@@ -67,3 +68,3 @@ ```js | ||
**Passing a nested array:** | ||
### Passing a nested array | ||
@@ -82,3 +83,3 @@ ```js | ||
**Passing a nested array with including keys:** | ||
### Passing a nested array with including keys | ||
@@ -97,3 +98,3 @@ ```js | ||
**Passing a nested array with excluding keys:** | ||
### Passing a nested array with excluding keys | ||
@@ -110,7 +111,9 @@ ```js | ||
// Result: [] | ||
// The result will be an empty array when nothing matches with the provided params | ||
``` | ||
<sub>The result will be an empty array because we exclude the `name` key from the search so nothing will be matched with the provided params.</sub> | ||
**Passing a nested array with exact search *(Only available in `v1.0.6+`)*:** | ||
### Passing a nested array with exact search | ||
<sub>(Only available in `v1.0.6+`)</sub> | ||
```js | ||
@@ -126,7 +129,8 @@ const arr = [ | ||
// Result: [{ name: "Jane", lastName: "Doe" }] | ||
// It will only match Jane and not Janet | ||
``` | ||
<sub>It will only match Jane and not Janet.</sub> | ||
## Demo | ||
You can check the [working demo](https://runkit.com/smakss/5f738b7f464579001bfda2d0) in runkit. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9673
129