chg: refactored global encodeForm() method to JS

This commit is contained in:
Tobi Schäfer 2017-03-19 17:50:18 +01:00
parent 98a8cdbc53
commit c085492c27
2 changed files with 11 additions and 13 deletions

10
js/Global/encodeForm.js Normal file
View file

@ -0,0 +1,10 @@
// import 'encode';
var encodeForm = function(str, buffer) {
str = String(str);
if (str === null || !str.length) return str;
if (!buffer) buffer = [];
return encode(str, buffer, false);
};