forked from 0x2620/oxjs
use [].slice, not Ox.sub
This commit is contained in:
parent
915e98f829
commit
f990f3b857
7 changed files with 10 additions and 10 deletions
|
|
@ -280,7 +280,7 @@ Ox.doc = (function() {
|
|||
}
|
||||
});
|
||||
function unwrap(str) {
|
||||
return (isArray = /^\[.+\]$/.test(str)) ? Ox.sub(str, 1, -1) : str;
|
||||
return (isArray = /^\[.+\]$/.test(str)) ? str.slice(1, -1) : str;
|
||||
}
|
||||
function wrap(str) {
|
||||
return isArray ? '[' + str + 's' + ']' : str;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue