chg: refactored global encodeForm() method to JS
This commit is contained in:
parent
98a8cdbc53
commit
c085492c27
2 changed files with 11 additions and 13 deletions
10
js/Global/encodeForm.js
Normal file
10
js/Global/encodeForm.js
Normal 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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue