(data, value = 0)
| 965 | } |
| 966 | |
| 967 | function crc32(data, value = 0) { |
| 968 | if (typeof data !== 'string' && !isArrayBufferView(data)) { |
| 969 | throw new ERR_INVALID_ARG_TYPE('data', ['Buffer', 'TypedArray', 'DataView', 'string'], data); |
| 970 | } |
| 971 | validateUint32(value, 'value'); |
| 972 | // Coerce -0 to +0. |
| 973 | value += 0; |
| 974 | return crc32Native(data, value); |
| 975 | } |
| 976 | |
| 977 | // Legacy alias on the C++ wrapper object. This is not public API, so we may |
| 978 | // want to runtime-deprecate it at some point. There's no hurry, though. |
no outgoing calls
no test coverage detected
searching dependent graphs…