Socket
Socket
Sign inDemoInstall

bs2-programmer

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs2-programmer - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

8

examples/search.js

@@ -27,6 +27,3 @@ /*eslint-disable no-process-exit */

// maybe this could be a `search` method on programmer????
return protocol.enterProgramming()
.then(function(){
return bs2.identify(bs2Options);
})
return bs2.identify(bs2Options)
.then(function(content){

@@ -37,5 +34,2 @@ return { value: content, done: true };

return { value: null, seed: idx + 1 };
})
.finally(function(){
return protocol.exitProgramming();
});

@@ -42,0 +36,0 @@ }, 0);

20

lib/programmer.js

@@ -58,3 +58,3 @@ 'use strict';

//have to call enterprogramming before and exitprogramming after this function
Programmer.prototype.identify = function(cb){
Programmer.prototype._identifyBoard = function(cb){
var revision = this._revision;

@@ -73,2 +73,18 @@ var protocol = this._protocol;

Programmer.prototype.identify = function(cb){
var self = this;
var protocol = this._protocol;
var promise = protocol.enterProgramming()
.then(function(){
return self._identifyBoard();
})
.then(function(board){
return protocol.exitProgramming().yield(board);
});
return nodefn.bindCallback(promise, cb);
};
Programmer.prototype.bootload = function(hex, cb){

@@ -109,3 +125,3 @@ var self = this;

.then(function(){
return self.identify();
return self._identifyBoard();
})

@@ -112,0 +128,0 @@ .then(upload)

{
"name": "bs2-programmer",
"version": "2.0.0",
"version": "2.1.0",
"description": "Upload tokenized hex to Basic Stamp 2",

@@ -23,6 +23,6 @@ "main": "index.js",

"type": "git",
"url": "https://github.com/jacobrosenthal/bs2-programmer"
"url": "https://github.com/irkenjs/bs2-programmer"
},
"bugs": {
"url": "https://github.com/jacobrosenthal/bs2-programmer/issues"
"url": "https://github.com/irkenjs/bs2-programmer/issues"
},

@@ -29,0 +29,0 @@ "author": "Jacob Rosenthal",

@@ -1,4 +0,4 @@

#bs2
#bs2-programmer
[![Build Status](https://travis-ci.org/jacobrosenthal/bs2-programmer.svg)](https://travis-ci.org/jacobrosenthal/bs2-programmer)
[![Build Status](https://travis-ci.org/irkenjs/bs2-programmer.svg)](https://travis-ci.org/irkenjs/bs2-programmer)

@@ -48,4 +48,4 @@ Upload tokenized hex to Basic Stamp 2.

* Called for you by bootload, but exposed for your convenience.
* Called for you by bootload, but exposed for your convenience.
* Takes a previously opened, reset stream-style object (See the example for details) and a Node buffer of tokenized bytes to send.
* Callback has singature (error, object) where object is a version object like { name: 'BS2', version: '1.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