Socket
Socket
Sign inDemoInstall

@sensebox/sketch-templater

Package Overview
Dependencies
Maintainers
5
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sensebox/sketch-templater - npm Package Compare versions

Comparing version 1.11.2 to 1.12.0

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # node-sketch-templater Changelog

## v1.12.0
- 🔧 Fix variable naming
## v1.11.2

@@ -7,0 +11,0 @@ - 🔧 Fix BME680_CONNECTED issue

2

package.json
{
"name": "@sensebox/sketch-templater",
"version": "1.11.2",
"version": "1.12.0",
"description": "nodejs library to create senseBox Arduino Sketches",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -11,4 +11,4 @@ 'use strict';

const output = [];
for (const [i, { _id, title }] of sensors.entries()) {
output.push(dedent`// ${title}
for (const [i, { _id, title, sensorType }] of sensors.entries()) {
output.push(dedent`// ${title} - ${sensorType}
#define SENSOR${i + 1}_ID "${_id}"`);

@@ -23,3 +23,3 @@ }

const value = sensor[key].replace(/\s+/g, '');
output.push(dedent`// ${sensor.title}
output.push(dedent`// ${sensor.title} - ${sensor.sensorType}
#define ${prefix}${value.toUpperCase()}${suffix}`);

@@ -32,2 +32,14 @@ }

const output = [];
for (const { _id, title, sensorType } of sensors) {
output.push(dedent`// ${title} - ${sensorType}
const char ${sensorType.toUpperCase()}_${title
.toUpperCase()
.replace(/[^A-Z0-9]+/g, '')
.slice(0, 6)}SENSOR_ID[] PROGMEM = "${_id}";`);
}
return output.join('\r\n');
},
toProgmemWithoutPrefix(sensors) {
const output = [];
for (const { _id, title } of sensors) {

@@ -71,15 +83,14 @@ output.push(dedent`// ${title}

return `{${chunks.map(c => ` 0x${c}`)} }`;
return `{${chunks.map((c) => ` 0x${c}`)} }`;
},
toDefineDisplay(display){
toDefineDisplay(display) {
const output = [];
if(display === 'true'){
if (display === 'true') {
output.push(`#define DISPLAY128x64_CONNECTED`);
}
else{
} else {
output.push(`//#define DISPLAY128x64_CONNECTED`);
}
return output.join('\r\n');
return output.join('\r\n');
}
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc