From 6d0093eed41438ddace3a26d3d944bae62d10640 Mon Sep 17 00:00:00 2001 From: "Akihiko.KIgure" Date: Tue, 11 Jan 2022 18:06:49 +0900 Subject: [PATCH] =?UTF-8?q?parseUint16=20=E3=81=AE=E5=BC=95=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 0a3defa..8f7524a 100644 --- a/index.ts +++ b/index.ts @@ -1,11 +1,11 @@ -import { openPromisified } from "i2c-bus"; +import { openPromisified } from 'i2c-bus'; const I2CPortMapSizeMax = 32; const Uint16Max = 65535; -function parseUint16(string: string) { - const n = Number.parseInt(string, 10); +function parseUint16(parseString: string) { + const n = Number.parseInt(parseString, 10); if (0 <= n && n <= Uint16Max) return n; else throw new RangeError(`Must be between 0 and ${Uint16Max}.`); }