UNPKG

@stdlib/array

Version:
32 lines (24 loc) 649 B
{{alias}}( from, to ) Returns a boolean indicating whether a provided array data type can be safely cast to, or is of the same "kind" as, another array data type. Parameters ---------- from: string Array data type. to: string Array data type. Returns ------- bool: boolean Boolean indicating whether a provided data type can be cast to another data type. Examples -------- > var bool = {{alias}}( 'float32', 'float64' ) true > bool = {{alias}}( 'uint16', 'int32' ) true > bool = {{alias}}( 'uint16', 'int16' ) false See Also --------