yo-crc-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

yo-crc-js

A module that is used to calculate the checksum.

Installation and Usage

npm install yo-crc-js
import { crc16IBM, crc16IBMi, crc32IEEE, crc32IEEEi } from '../index';

// string '123456789'
const uint8Array = new Uint8Array([ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 ]);
const arrayNumber = [ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 ];
const str = '123456789';


console.log(`
    crc16IBM (data: Uint8Array) => ${crc16IBM(uint8Array)},
    crc16IBM (data: number[]) => ${crc16IBM(arrayNumber)},
    crc16IBM (data: string) => ${crc16IBM(str)}
    `);

Readme

Keywords

none

Package Sidebar

Install

npm i yo-crc-js

Weekly Downloads

1

Version

1.1.0

License

none

Unpacked Size

237 kB

Total Files

33

Last publish

Collaborators

  • yolik