node-web-gpio 1.1.44 → 1.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39,7 +39,8 @@ function parseUint16(parseString) {
39
39
  * GPIO0 オフセット
40
40
  * @see {@link https://github.com/raspberrypi/linux/issues/6037}
41
41
  */
42
- const GpioOffset = process.platform === 'linux' && 6.6 <= Number(os.release().match(/\d+\.\d+/))
42
+ const GpioOffset = process.platform === 'linux' &&
43
+ os.release().localeCompare('6.6', undefined, { numeric: true }) >= 0
43
44
  ? 512
44
45
  : 0;
45
46
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-web-gpio",
3
- "version": "1.1.44",
3
+ "version": "1.1.45",
4
4
  "description": "GPIO access with Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",