isBinary

Determines whether a value is stored as binary data.

isBinary(value) → returns boolean

isBinary Argument Reference

value any
Required

Examples sample code invoking the isBinary function

toBase64() returns base64 encoded data which is not binary

isBinary( toBase64(1) )

Expected Result: false

toBinary() expects base64 encoded data and returns binary data

isBinary( toBinary(toBase64(1)) )

Expected Result: true


Fork me on GitHub