repl.txt (1455B)
1 2 {{alias}}( value ) 3 Tests if a value is an array of strings. 4 5 Parameters 6 ---------- 7 value: any 8 Value to test. 9 10 Returns 11 ------- 12 bool: boolean 13 Boolean indicating whether value is an array of strings. 14 15 Examples 16 -------- 17 > var bool = {{alias}}( [ 'abc', 'def' ] ) 18 true 19 > bool = {{alias}}( [ 'abc', 123 ] ) 20 false 21 22 23 {{alias}}.primitives( value ) 24 Tests if a value is an array containing only string primitives. 25 26 Parameters 27 ---------- 28 value: any 29 Value to test. 30 31 Returns 32 ------- 33 bool: boolean 34 Boolean indicating whether value is an array containing only string 35 primitives. 36 37 Examples 38 -------- 39 > var arr = [ 'abc', 'def' ]; 40 > var bool = {{alias}}.primitives( arr ) 41 true 42 > arr = [ 'abc', new String( 'def' ) ]; 43 > bool = {{alias}}.primitives( arr ) 44 false 45 46 47 {{alias}}.objects( value ) 48 Tests if a value is an array containing only `String` objects. 49 50 Parameters 51 ---------- 52 value: any 53 Value to test. 54 55 Returns 56 ------- 57 bool: boolean 58 Boolean indicating whether value is an array containing only `String` 59 objects. 60 61 Examples 62 -------- 63 > var arr = [ new String( 'ab' ), new String( 'cd' ) ]; 64 > var bool = {{alias}}.objects( arr ) 65 true 66 > arr = [ new String( 'abc' ), 'def' ]; 67 > bool = {{alias}}.objects( arr ) 68 false 69 70 See Also 71 -------- 72