Skip to content

Commit 8bce004

Browse files
authored
Update Readme for object to array
1 parent d6e0d03 commit 8bce004

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

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

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

1919
let arr = [1, 2];
2020
console.log(is_array(arr)); // true
21-
```
21+
22+
const objectX = {
23+
0:"Apple",
24+
1:"Microsoft",
25+
2:"Google"
26+
}
27+
28+
console.log(object_to_array(objectX)) // [ 'Apple', 'Microsoft', 'Google' ]
29+
30+
```

0 commit comments

Comments
 (0)