bluetooth-terminal
Advanced tools
Comparing version 1.3.3 to 1.3.4
{ | ||
"name": "bluetooth-terminal", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "ES6 class for serial communication with Bluetooth Low Energy (Smart) devices", | ||
@@ -14,3 +14,3 @@ "main": "./src/BluetoothTerminal.js", | ||
"type": "git", | ||
"url": "git+https://github.com/1oginov/bluetooth-terminal.git" | ||
"url": "git+https://github.com/loginov-rocks/bluetooth-terminal.git" | ||
}, | ||
@@ -31,5 +31,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/1oginov/bluetooth-terminal/issues" | ||
"url": "https://github.com/loginov-rocks/bluetooth-terminal/issues" | ||
}, | ||
"homepage": "https://github.com/1oginov/bluetooth-terminal", | ||
"homepage": "https://github.com/loginov-rocks/bluetooth-terminal", | ||
"devDependencies": { | ||
@@ -39,10 +39,10 @@ "chai": "^4.2.0", | ||
"coveralls": "^3.0.2", | ||
"eslint": "^5.6.1", | ||
"eslint-config-google": "^0.10.0", | ||
"eslint": "^5.11.1", | ||
"eslint-config-google": "^0.11.0", | ||
"istanbul": "^0.4.5", | ||
"jsdom": "^12.1.0", | ||
"jsdom": "^13.1.0", | ||
"mocha": "^5.2.0", | ||
"sinon": "^6.3.4", | ||
"sinon": "^7.2.2", | ||
"web-bluetooth-mock": "^1.0.2" | ||
} | ||
} |
# bluetooth-terminal | ||
[![NpmVersion](https://img.shields.io/npm/v/bluetooth-terminal.svg)](https://www.npmjs.com/package/bluetooth-terminal) | ||
[![Build Status](https://travis-ci.org/1oginov/bluetooth-terminal.svg?branch=master)](https://travis-ci.org/1oginov/bluetooth-terminal) | ||
[![Coverage Status](https://coveralls.io/repos/github/1oginov/bluetooth-terminal/badge.svg?branch=master)](https://coveralls.io/github/1oginov/bluetooth-terminal?branch=master) | ||
[![devDependencies Status](https://david-dm.org/1oginov/bluetooth-terminal/dev-status.svg)](https://david-dm.org/1oginov/bluetooth-terminal?type=dev) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/1oginov/bluetooth-terminal.svg)](https://greenkeeper.io/) | ||
[![Build Status](https://travis-ci.org/loginov-rocks/bluetooth-terminal.svg?branch=master)](https://travis-ci.org/loginov-rocks/bluetooth-terminal) | ||
[![Coverage Status](https://coveralls.io/repos/github/loginov-rocks/bluetooth-terminal/badge.svg?branch=master)](https://coveralls.io/github/loginov-rocks/bluetooth-terminal?branch=master) | ||
[![devDependencies Status](https://david-dm.org/loginov-rocks/bluetooth-terminal/dev-status.svg)](https://david-dm.org/loginov-rocks/bluetooth-terminal?type=dev) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/loginov-rocks/bluetooth-terminal.svg)](https://greenkeeper.io/) | ||
@@ -15,3 +15,3 @@ **BluetoothTerminal** is a class written in ES6 for serial communication with Bluetooth Low Energy (Smart) devices from | ||
Please check out the [Web-Bluetooth-Terminal](https://github.com/1oginov/Web-Bluetooth-Terminal) repository to see | ||
Please check out the [Web-Bluetooth-Terminal](https://github.com/loginov-rocks/Web-Bluetooth-Terminal) repository to see | ||
implementation details in a real life example. | ||
@@ -23,4 +23,4 @@ | ||
You can use the [script](https://github.com/1oginov/bluetooth-terminal/blob/master/src/BluetoothTerminal.js) directly or | ||
install it using [npm](https://npmjs.com) and require in your code. | ||
You can use the [script](https://github.com/loginov-rocks/bluetooth-terminal/blob/master/src/BluetoothTerminal.js) | ||
directly or install it using [npm](https://npmjs.com) and require in your code. | ||
@@ -193,2 +193,2 @@ ```sh | ||
Please use the [dev](https://github.com/1oginov/bluetooth-terminal/tree/dev) branch and feel free to contribute! | ||
Please use the [dev](https://github.com/loginov-rocks/bluetooth-terminal/tree/dev) branch and feel free to contribute! |
@@ -152,3 +152,3 @@ /** | ||
// Split data to chunks by max characteristic value length. | ||
let chunks = this.constructor._splitByLength(data, | ||
const chunks = this.constructor._splitByLength(data, | ||
this._maxCharacteristicValueLength); | ||
@@ -335,3 +335,3 @@ | ||
_handleDisconnection(event) { | ||
let device = event.target; | ||
const device = event.target; | ||
@@ -352,7 +352,7 @@ this._log('"' + device.name + | ||
_handleCharacteristicValueChanged(event) { | ||
let value = new TextDecoder().decode(event.target.value); | ||
const value = new TextDecoder().decode(event.target.value); | ||
for (let c of value) { | ||
for (const c of value) { | ||
if (c === this._receiveSeparator) { | ||
let data = this._receiveBuffer.trim(); | ||
const data = this._receiveBuffer.trim(); | ||
this._receiveBuffer = ''; | ||
@@ -359,0 +359,0 @@ |
@@ -191,3 +191,3 @@ 'use strict'; | ||
describe('receive', () => { | ||
let characteristicValueChangedEvent = new window. | ||
const characteristicValueChangedEvent = new window. | ||
CustomEvent('characteristicvaluechanged'); | ||
@@ -207,3 +207,3 @@ let connectPromise; | ||
() => { | ||
let value = 'Hello, world!'; | ||
const value = 'Hello, world!'; | ||
@@ -222,3 +222,3 @@ return connectPromise. | ||
it('should be called when a value provided have a separator', () => { | ||
let value = 'Hello, world!' + bt._receiveSeparator; | ||
const value = 'Hello, world!' + bt._receiveSeparator; | ||
@@ -238,3 +238,3 @@ return connectPromise. | ||
'but there is no data data between the first and second', () => { | ||
let value = 'Hello, world!' + bt._receiveSeparator + | ||
const value = 'Hello, world!' + bt._receiveSeparator + | ||
bt._receiveSeparator + 'Ciao, mondo!' + bt._receiveSeparator; | ||
@@ -335,3 +335,3 @@ | ||
describe('_stopNotifications', () => { | ||
let characteristicValueChangedEvent = new window. | ||
const characteristicValueChangedEvent = new window. | ||
CustomEvent('characteristicvaluechanged'); | ||
@@ -350,3 +350,3 @@ let connectPromise; | ||
it('should stop data receiving', () => { | ||
let value = 'Hello, world!' + bt._receiveSeparator; | ||
const value = 'Hello, world!' + bt._receiveSeparator; | ||
@@ -381,3 +381,3 @@ let characteristic; | ||
let device; | ||
let gattServerDisconnectedEvent = new window. | ||
const gattServerDisconnectedEvent = new window. | ||
CustomEvent('gattserverdisconnected'); | ||
@@ -384,0 +384,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39143
17
1