Skip to content

Commit 112fe02

Browse files
committed
Changed type in package.json
1 parent ea2caaf commit 112fe02

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

index.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function array_chunk(arr, chunk_size) {
4646

4747
function array_filter(arr) {
4848
is_array(arr);
49-
arr = arr.filter(function (e) {
49+
arr = arr.filter((e) => {
5050
return e === 0 || e;
5151
});
5252
return arr;
@@ -65,11 +65,20 @@ function array_frequency(arr) {
6565
return freq_obj;
6666
}
6767

68-
function object_to_array(obj){
69-
let temp=[]
70-
const entries = Object.entries(obj)
71-
entries.forEach(ent => temp.push(ent[1]))
68+
function object_to_array(obj) {
69+
let temp = [];
70+
const entries = Object.entries(obj);
71+
entries.forEach((ent) => temp.push(ent[1]));
7272
return temp;
7373
}
7474

75-
export { is_array, head, tail, in_array, array_filter, array_chunk, array_frequency,object_to_array };
75+
export {
76+
head,
77+
tail,
78+
is_array,
79+
in_array,
80+
array_chunk,
81+
array_filter,
82+
array_frequency,
83+
object_to_array,
84+
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.2.1",
44
"description": "Array Helper functions.",
55
"main": "index.js",
6+
"type": "module",
67
"scripts": {
78
"test": "exit 0"
89
},

0 commit comments

Comments
 (0)