Type Definitions
Functions
-
crc32( inputData ) → string
module:utils/crc32~crc32
Calculates CRC-32 checksum for a given inputData to verify the integrity of data.
Parameters
inputData
:
CRCData
Accepts a single value (string, number, boolean), an array of strings, or an array of all of the above types.
Non-string values are converted to strings before calculating the checksum.
The checksum calculation is based on the concatenated string representation of the input values:
crc32('foo')
is equivalent to crc32(['foo'])
crc32(123)
is equivalent to crc32(['123'])
crc32(true)
is equivalent to crc32(['true'])
crc32(['foo', 123, true])
produces the same result as crc32('foo123true')
- Nested arrays of strings are flattened, so
crc32([['foo', 'bar'], 'baz'])
is equivalent to crc32(['foobar', 'baz'])
Returns
string
The CRC-32 checksum, returned as a hexadecimal string.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing?
Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features.
We appreciate your feedback to help us ensure its accuracy and completeness.