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