Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

crc

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

13

lib/crc.js

@@ -17,8 +17,11 @@ // Generated by CoffeeScript 1.7.1

CRC.prototype.each_byte = function(str, cb) {
var char, _i, _len, _results;
CRC.prototype.each_byte = function(buf, cb) {
var byte, _i, _len, _results;
if (typeof buf === 'string') {
buf = new Buffer(buf);
}
_results = [];
for (_i = 0, _len = str.length; _i < _len; _i++) {
char = str[_i];
_results.push(cb(char.charCodeAt(0)));
for (_i = 0, _len = buf.length; _i < _len; _i++) {
byte = buf[_i];
_results.push(cb(byte));
}

@@ -25,0 +28,0 @@ return _results;

{
"name": "crc",
"version": "2.0.0",
"version": "2.1.0",
"description": "CRC JavaScript implementation",

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

@@ -50,2 +50,7 @@ # crc

Or using a `Buffer`:
crc.crc32(fs.readFileAsync('README.md'));
# => "127ad531"
Incrementally calculate a CRC32:

@@ -52,0 +57,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc