File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ npm i @hetarth02/js-array-helpers
1414In 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
1919let arr = [1 , 2 ];
2020console .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```
You can’t perform that action at this time.
0 commit comments