forked from 0x2620/oxjs
misc fixes
This commit is contained in:
parent
44a8ff015c
commit
8ea49fab73
10 changed files with 41 additions and 16 deletions
|
|
@ -4516,7 +4516,7 @@ Ox.isValidEmail <f> Tests if a string is a valid e-mail address
|
|||
@*/
|
||||
// fixme: rename to isEmail
|
||||
Ox.isValidEmail = function(str) {
|
||||
return !!/^[0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6}$/i(str);
|
||||
return !!/^[0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6}$/i.test(str);
|
||||
}
|
||||
|
||||
/*@
|
||||
|
|
@ -4613,6 +4613,8 @@ Ox.repeat <f> Repeat a value multiple times
|
|||
"foofoofoo"
|
||||
> Ox.repeat([1, 2], 3)
|
||||
[1, 2, 1, 2, 1, 2]
|
||||
> Ox.repeat([{k: "v"}], 3)
|
||||
[{k: "v"}, {k: "v"}, {k: "v"}]
|
||||
@*/
|
||||
Ox.repeat = function(val, num) {
|
||||
var ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue