Skip to content

Commit 47bd652

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

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
@@ -13,26 +13,34 @@ npm i @hetarth02/js-array-helpers
1313

1414
In your `package.json` add the following, `"type": "module"`.
1515

16+
### is_array()
1617
```js
1718
import { is_array, object_to_array ,search_in_array} from "@hetarth02/js-array-helpers";
1819

1920
let arr = [1, 2];
2021
console.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

2832
console.log(object_to_array(objectX)) // [ 'Apple', 'Microsoft', 'Google' ]
29-
33+
34+
```
35+
36+
### search_in_array
37+
```js
3038

3139
const mang = [ 'Microsoft','apple','netflix','Google' ]
3240

3341
const result = search_in_array("app",mang);
3442

35-
console.log(result) // ['apple']
43+
console.log(result); // ['apple']
3644

3745

3846
```

0 commit comments

Comments
 (0)