UNPKG

crc

Version:

Module for calculating Cyclic Redundancy Check (CRC) for Node.js and the Browser.

9 lines (7 loc) 174 B
export default function(model, calc) { const fn = (buf, previous) => calc(buf, previous) >>> 0; fn.signed = calc; fn.unsigned = fn; fn.model = model; return fn; }