Skip to content
This repository was archived by the owner on Jan 11, 2022. It is now read-only.

Commit b0609b8

Browse files
committed
add a helper function
1 parent 01f774e commit b0609b8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/global.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,12 @@ module.exports = {
6262

6363
callback(null, result);
6464
});
65+
},
66+
arrayParam: function(name, array){
67+
var parts = []
68+
array.forEach(function(value){
69+
parts.push(module.exports.pathEscape(name + "[]=" + value));
70+
});
71+
return parts.join('&');
6572
}
6673
}

0 commit comments

Comments
 (0)