1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
{{alias}}( value )
Tests if a value is a URI.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is a URI.
Examples
--------
> var bool = {{alias}}( 'http://google.com' )
true
> bool = {{alias}}( 'http://localhost/' )
true
> bool = {{alias}}( 'http://example.w3.org/path%20with%20spaces.html' )
true
> bool = {{alias}}( 'ftp://ftp.is.co.za/rfc/rfc1808.txt' )
true
// No scheme:
> bool = {{alias}}( '' )
false
> bool = {{alias}}( 'foo@bar' )
false
> bool = {{alias}}( '://foo/' )
false
// Illegal characters:
> bool = {{alias}}( 'http://<foo>' )
false
// Invalid path:
> bool = {{alias}}( 'http:////foo.html' )
false
// Incomplete hex escapes:
> bool = {{alias}}( 'http://example.w3.org/%a' )
false
See Also
--------
|