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 @@ -13,26 +13,34 @@ npm i @hetarth02/js-array-helpers
1313
1414In your ` package.json ` add the following, ` "type": "module" ` .
1515
16+ ### is_array()
1617``` js
1718import { is_array , object_to_array ,search_in_array } from " @hetarth02/js-array-helpers" ;
1819
1920let arr = [1 , 2 ];
2021console .log (is_array (arr)); // true
22+ ```
2123
24+ ### object_to_array
25+ ``` js
2226 const objectX = {
2327 0 : " Apple" ,
2428 1 : " Microsoft" ,
2529 2 : " Google"
2630 }
2731
2832console .log (object_to_array (objectX)) // [ 'Apple', 'Microsoft', 'Google' ]
29-
33+
34+ ```
35+
36+ ### search_in_array
37+ ``` js
3038
3139const mang = [ ' Microsoft' ,' apple' ,' netflix' ,' Google' ]
3240
3341const result = search_in_array (" app" ,mang);
3442
35- console .log (result) // ['apple']
43+ console .log (result); // ['apple']
3644
3745
3846```
You can’t perform that action at this time.
0 commit comments