forked from 0x2620/oxjs
update video editor (editables)
This commit is contained in:
parent
43cfc1f0b5
commit
408ebf54cb
7 changed files with 55 additions and 51 deletions
|
|
@ -25,12 +25,14 @@ Ox.clean <f> Remove leading, trailing and double whitespace from a string
|
|||
"foo bar"
|
||||
> Ox.clean(" foo \n bar ")
|
||||
"foo\nbar"
|
||||
> Ox.clean(" \nfoo\n\nbar\n ")
|
||||
"foo\nbar"
|
||||
> Ox.clean(" foo\tbar ")
|
||||
"foo bar"
|
||||
@*/
|
||||
Ox.clean = function(str) {
|
||||
return Ox.map(str.split('\n'), function(str) {
|
||||
return Ox.trim(str.replace(/\s+/g, ' '));
|
||||
return Ox.trim(str.replace(/\s+/g, ' ')) || null;
|
||||
}).join('\n');
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue