Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crc

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crc - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

48

index.js

@@ -1,11 +0,37 @@

export { default as crc1 } from './crc1';
export { default as crc8 } from './crc8';
export { default as crc81wire } from './crc81wire';
export { default as crc16 } from './crc16';
export { default as crc16ccitt } from './crc16ccitt';
export { default as crc16modbus } from './crc16modbus';
export { default as crc16xmodem } from './crc16xmodem';
export { default as crc16kermit } from './crc16kermit';
export { default as crc24 } from './crc24';
export { default as crc32 } from './crc32';
export { default as crcjam } from './crcjam';
import crc1 from './crc1';
import crc8 from './crc8';
import crc81wire from './crc81wire';
import crc16 from './crc16';
import crc16ccitt from './crc16ccitt';
import crc16modbus from './crc16modbus';
import crc16xmodem from './crc16xmodem';
import crc16kermit from './crc16kermit';
import crc24 from './crc24';
import crc32 from './crc32';
import crcjam from './crcjam';
export { crc1 };
export { crc8 };
export { crc81wire };
export { crc16 };
export { crc16ccitt };
export { crc16modbus };
export { crc16xmodem };
export { crc16kermit };
export { crc24 };
export { crc32 };
export { crcjam };
export default {
crc1,
crc8,
crc81wire,
crc16,
crc16ccitt,
crc16modbus,
crc16xmodem,
crc16kermit,
crc24,
crc32,
crcjam,
};

@@ -6,102 +6,73 @@ 'use strict';

});
exports.crcjam = exports.crc32 = exports.crc24 = exports.crc16kermit = exports.crc16xmodem = exports.crc16modbus = exports.crc16ccitt = exports.crc16 = exports.crc81wire = exports.crc8 = exports.crc1 = undefined;
var _crc = require('./crc1');
Object.defineProperty(exports, 'crc1', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc).default;
}
});
var _crc2 = _interopRequireDefault(_crc);
var _crc2 = require('./crc8');
var _crc3 = require('./crc8');
Object.defineProperty(exports, 'crc8', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc2).default;
}
});
var _crc4 = _interopRequireDefault(_crc3);
var _crc81wire = require('./crc81wire');
Object.defineProperty(exports, 'crc81wire', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc81wire).default;
}
});
var _crc81wire2 = _interopRequireDefault(_crc81wire);
var _crc3 = require('./crc16');
var _crc5 = require('./crc16');
Object.defineProperty(exports, 'crc16', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc3).default;
}
});
var _crc6 = _interopRequireDefault(_crc5);
var _crc16ccitt = require('./crc16ccitt');
Object.defineProperty(exports, 'crc16ccitt', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc16ccitt).default;
}
});
var _crc16ccitt2 = _interopRequireDefault(_crc16ccitt);
var _crc16modbus = require('./crc16modbus');
Object.defineProperty(exports, 'crc16modbus', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc16modbus).default;
}
});
var _crc16modbus2 = _interopRequireDefault(_crc16modbus);
var _crc16xmodem = require('./crc16xmodem');
Object.defineProperty(exports, 'crc16xmodem', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc16xmodem).default;
}
});
var _crc16xmodem2 = _interopRequireDefault(_crc16xmodem);
var _crc16kermit = require('./crc16kermit');
Object.defineProperty(exports, 'crc16kermit', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc16kermit).default;
}
});
var _crc16kermit2 = _interopRequireDefault(_crc16kermit);
var _crc4 = require('./crc24');
var _crc7 = require('./crc24');
Object.defineProperty(exports, 'crc24', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc4).default;
}
});
var _crc8 = _interopRequireDefault(_crc7);
var _crc5 = require('./crc32');
var _crc9 = require('./crc32');
Object.defineProperty(exports, 'crc32', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crc5).default;
}
});
var _crc10 = _interopRequireDefault(_crc9);
var _crcjam = require('./crcjam');
Object.defineProperty(exports, 'crcjam', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_crcjam).default;
}
});
var _crcjam2 = _interopRequireDefault(_crcjam);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.crc1 = _crc2.default;
exports.crc8 = _crc4.default;
exports.crc81wire = _crc81wire2.default;
exports.crc16 = _crc6.default;
exports.crc16ccitt = _crc16ccitt2.default;
exports.crc16modbus = _crc16modbus2.default;
exports.crc16xmodem = _crc16xmodem2.default;
exports.crc16kermit = _crc16kermit2.default;
exports.crc24 = _crc8.default;
exports.crc32 = _crc10.default;
exports.crcjam = _crcjam2.default;
exports.default = {
crc1: _crc2.default,
crc8: _crc4.default,
crc81wire: _crc81wire2.default,
crc16: _crc6.default,
crc16ccitt: _crc16ccitt2.default,
crc16modbus: _crc16modbus2.default,
crc16xmodem: _crc16xmodem2.default,
crc16kermit: _crc16kermit2.default,
crc24: _crc8.default,
crc32: _crc10.default,
crcjam: _crcjam2.default
};
{
"name": "crc",
"version": "3.7.0",
"version": "3.8.0",
"description": "Module for calculating Cyclic Redundancy Check (CRC) for Node.js and the Browser.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -32,3 +32,3 @@ # crc

Calculate a CRC32:
Calculate a CRC32 (recommended way):

@@ -41,5 +41,13 @@ ```js

or
Import everything (this may bloat bundle size):
```js
import crc from 'crc';
crc.crc32('hello').toString(16);
// "3610a686"
```
Or use CommonJS (compatability mode, no longer recommended):
```js
const { crc32 } = require('crc');

@@ -60,3 +68,3 @@ crc32('hello').toString(16);

```js
crc32(fs.readFileSync('README.md')).toString(16);
crc32(fs.readFileSync('README.md', 'utf8')).toString(16);
// "127ad531"

@@ -79,22 +87,2 @@ ```

### Bundling
This library exposes an ES6 module, so if you are using a bundling tool such as Webpack or
Rollup, you can just `import` it, and the bundle will not include unneccesary code:
```js
import crc from 'crc';
crc.crc32('hello').toString(16);
// "3610a686"
```
Or, alternatively:
```js
import { crc32 } from 'crc';
crc32('hello').toString(16);
```
## Running tests

@@ -101,0 +89,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc