Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smakss/search

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smakss/search - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "@smakss/search",
"version": "1.0.5",
"version": "1.0.6",
"description": "Search through array and/or objects for sepcific keyword.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -36,3 +36,4 @@ # Search

- `keys` (`Array`): Keys to include or exclude in your object items. If you exclude them it will exclude them from search and search won't perform on those specific keys. And if you include them search will only perform on those desired keys and it will ignore others.
- `include` (`Boolean`): A flag to determine whether the `keys` are included or excluded. It will be `True` by default, which means the keys will be included.
- `include` (`Boolean`): A flag to determine whether the `keys` are included or excluded. It will be `True` by default, which means the keys will be included.
- `exact` (`Boolean`): A flag to determine whether the you are exactly looking for `searchText` string or not. It will be `False` by default, which means it will not looking for exact `searchText`. e. g. Let's say `searchText` is `5` so it will match all numbers where they include `5` *(`5`, `15`, `25`, ...)* otherwise it will only match `5` alone. This feature is only available in `v1.0.6+`.

@@ -103,4 +104,18 @@ ## Examples of usage

**Passing a nested array with exact search *(Only available in `v1.0.6+`)*:**
```
const arr = [
{ name: "John", lastName: "Doe" },
{ name: "Janet", lastName: "Doe" },
[{ name: "Jane", lastName: "Doe" }]
];
Search({ searchText: "jane", searchItems: arr, exact: true });
// Result: [{ name: "Jane", lastName: "Doe" }]
// It will only match Jane and not Janet
```
## Demo
You can check the [working demo](https://runkit.com/smakss/5f738b7f464579001bfda2d0) in runkit.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc