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.6 to 1.0.7

2

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

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

@@ -5,3 +5,3 @@ # Search

Searching through arrays or objects might be easy these days with array helpers like [filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), but what if you have a nested array of object and want to search into every key of your object with a specific keyword? This might be hard or frustrating sometimes, this package will help you to achieve search a keyword through each object key, array elements and/or nested arrays. Also, this package uses ES6+ syntax so if you using older standards for writing JS code you may need a transpiler for it.
Searching through arrays or objects might be easy these days with array helpers like [filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) or libraries like [_lodash](https://www.npmjs.com/package/lodash), but what if you want a lighter library and have a nested array of object and want to search into every key of your object with a specific keyword? This might be hard or frustrating sometimes, this package will help you to achieve search a keyword through each object key, array elements and/or nested arrays. Also, this package uses ES6+ syntax so if you using older standards for writing JS code you may need a transpiler for it.

@@ -12,3 +12,3 @@ ## How it works?

```
```bash
npm i @smakss/search

@@ -21,3 +21,3 @@ or

```
```js
var Search = require('@smakss/search');

@@ -28,3 +28,3 @@ ```

```
```js
import Search from '@smakss/search';

@@ -47,3 +47,4 @@ ```

If the matching element was in object it will return the whole object.
```
```js
const obj = { name: "John", lastName: "Doe" };

@@ -57,3 +58,4 @@

**Passing an array:**
```
```js
const arr = [

@@ -70,3 +72,4 @@ { name: "John", lastName: "Doe" },

**Passing a nested array:**
```
```js
const arr = [

@@ -84,3 +87,4 @@ { name: "John", lastName: "Doe" },

**Passing a nested array with including keys:**
```
```js
const arr = [

@@ -98,3 +102,4 @@ { name: "John", lastName: "Doe" },

**Passing a nested array with excluding keys:**
```
```js
const arr = [

@@ -113,3 +118,4 @@ { name: "John", lastName: "Doe" },

**Passing a nested array with exact search *(Only available in `v1.0.6+`)*:**
```
```js
const arr = [

@@ -116,0 +122,0 @@ { name: "John", lastName: "Doe" },

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