1
0
Fork 0
forked from 0x2620/oxjs

update video editor (editables)

This commit is contained in:
rlx 2012-01-16 16:52:34 +05:30
commit 408ebf54cb
7 changed files with 55 additions and 51 deletions

View file

@ -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');
};