Skip to content

Commit 21580d4

Browse files
authored
Update README.md
1 parent d01b470 commit 21580d4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm i @hetarth02/js-array-helpers
1414
In your `package.json` add the following, `"type": "module"`.
1515

1616
```js
17-
import { is_array, object_to_array } from "@hetarth02/js-array-helpers";
17+
import { is_array, object_to_array ,search_in_array} from "@hetarth02/js-array-helpers";
1818

1919
let arr = [1, 2];
2020
console.log(is_array(arr)); // true
@@ -25,6 +25,14 @@ console.log(is_array(arr)); // true
2525
2:"Google"
2626
}
2727

28-
console.log(object_to_array(objectX)) // [ 'Apple', 'Microsoft', 'Google' ]
28+
console.log(object_to_array(objectX)) // [ 'Apple', 'Microsoft', 'Google' ]
29+
30+
31+
const mang = [ 'Microsoft','apple','netflix','Google' ]
32+
33+
const result = search_in_array("app",mang);
34+
35+
console.log(result) // ['apple']
36+
2937

3038
```

0 commit comments

Comments
 (0)