Socket
Socket
Sign inDemoInstall

node-srec

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-srec - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

package.json~

28

node-srec.js
// Generated by CoffeeScript 1.4.0
(function() {
var cache, fs, parseSrec, request;
var block2srec, cache, fs, parseSrec, request, sprintf;

@@ -9,2 +9,22 @@ fs = require('fs');

sprintf = require('sprintf').sprintf;
module.exports.block2srec = block2srec = function(a, data) {
var byte, s, sum, _i, _len;
sum = data.length + 5;
sum += a & 0xff;
sum += (a >> 8) & 0xff;
sum += (a >> 16) & 0xff;
sum += (a >> 24) & 0xff;
s = sprintf("S3%02X%08X", data.length + 5, a);
for (_i = 0, _len = data.length; _i < _len; _i++) {
byte = data[_i];
s += sprintf("%02X", byte);
sum += byte;
}
sum = (~sum) & 0xff;
s += sprintf("%02X", sum);
return s;
};
module.exports.parseSrec = parseSrec = function(data) {

@@ -95,3 +115,3 @@ var addr, alen, b, boot, byte, dp, i, info, len, max, mem, min, s, srecs, type, _i, _j, _k, _len, _len1, _ref;

module.exports.readSrecUrl = function(url, cb) {
if (cache[url]) {
if (false && cache[url]) {
console.log("node-srec: from Cache Url: '" + url + "'");

@@ -103,6 +123,8 @@ return cb(cache[url]);

if (!error && response.statusCode === 200) {
console.log("got " + url + " " + response);
cache[url] = parseSrec(body);
return cb(cache[url]);
} else {
return cb([]);
console.log("Error: cannot get " + url + "?? " + response);
return cb("", "Error: cannot get " + url + " http-status:" + response.statusCode);
}

@@ -109,0 +131,0 @@ });

2

package.json
{
"name": "node-srec",
"version": "0.0.4",
"version": "0.0.5",
"description": "Motorola S-record library",

@@ -5,0 +5,0 @@ "main": "node-srec.js",

Sorry, the diff of this file is not supported yet

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