@neurodevs/node-lsl 8.0.0 → 8.0.2
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.
- package/.vscode/settings.json +17 -20
- package/build/.spruce/errors/errors.types.js +0 -2
- package/build/.spruce/errors/errors.types.js.map +1 -1
- package/build/__tests__/behavioral/LslOutlet.test.js +9 -14
- package/build/__tests__/behavioral/LslOutlet.test.js.map +1 -1
- package/build/__tests__/behavioral/TimeMarkerOutlet.test.js.map +1 -1
- package/build/__tests__/implementation/Liblsl.test.d.ts +3 -1
- package/build/__tests__/implementation/Liblsl.test.js +44 -19
- package/build/__tests__/implementation/Liblsl.test.js.map +1 -1
- package/build/__tests__/support/consts.js.map +1 -1
- package/build/__tests__/support/generateRandomOutletOptions.js.map +1 -1
- package/build/assertions.js.map +1 -1
- package/build/consts.js.map +1 -1
- package/build/errors/SpruceError.d.ts +1 -1
- package/build/errors/SpruceError.js.map +1 -1
- package/build/errors/failedToLoadLiblsl.builder.js.map +1 -1
- package/build/implementations/Liblsl.js +40 -17
- package/build/implementations/Liblsl.js.map +1 -1
- package/build/implementations/LslOutlet.js +6 -14
- package/build/implementations/LslOutlet.js.map +1 -1
- package/build/implementations/TimeMarkerOutlet.js +4 -1
- package/build/implementations/TimeMarkerOutlet.js.map +1 -1
- package/build/nodeLsl.types.d.ts +11 -11
- package/build/testDoubles/FakeLiblsl.js.map +1 -1
- package/build/testDoubles/MockTimeMarkerOutlet.js.map +1 -1
- package/build/testDoubles/SpyExtendsTimeMarkerOutlet.js.map +1 -1
- package/build/testDoubles/SpyImplementsTimeMarkerOutlet.js.map +1 -1
- package/build/validations.js.map +1 -1
- package/eslint.config.mjs +3 -0
- package/package.json +26 -26
- package/src/.spruce/errors/errors.types.ts +0 -3
- package/src/__tests__/behavioral/LslOutlet.test.ts +272 -267
- package/src/__tests__/behavioral/TimeMarkerOutlet.test.ts +144 -141
- package/src/__tests__/implementation/Liblsl.test.ts +461 -424
- package/src/__tests__/support/consts.ts +22 -22
- package/src/__tests__/support/generateRandomOutletOptions.ts +13 -13
- package/src/assertions.ts +39 -39
- package/src/consts.ts +16 -16
- package/src/errors/SpruceError.ts +16 -16
- package/src/errors/failedToLoadLiblsl.builder.ts +8 -8
- package/src/implementations/Liblsl.ts +205 -181
- package/src/implementations/LslOutlet.ts +114 -114
- package/src/implementations/TimeMarkerOutlet.ts +50 -50
- package/src/nodeLsl.types.ts +65 -85
- package/src/testDoubles/FakeLiblsl.ts +58 -56
- package/src/testDoubles/MockTimeMarkerOutlet.ts +56 -56
- package/src/testDoubles/SpyExtendsTimeMarkerOutlet.ts +11 -11
- package/src/testDoubles/SpyImplementsTimeMarkerOutlet.ts +28 -28
- package/src/validations.ts +6 -6
- package/tsconfig.json +3 -4
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -3
package/src/validations.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export function isStringInArray(value: string, array: readonly string[]) {
|
|
2
|
-
|
|
2
|
+
return array.indexOf(value) !== -1
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
export function isGreaterThanOrEqualToZero(value: number) {
|
|
6
|
-
|
|
6
|
+
return value >= 0
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function isPositiveInteger(value: number) {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
//@ts-ignore
|
|
11
|
+
return Number.isInteger(value) && value > 0
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export function isPositiveIntegerOrZero(value: number) {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
//@ts-ignore
|
|
16
|
+
return Number.isInteger(value) && value >= 0
|
|
17
17
|
}
|
package/tsconfig.json
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
"skipLibCheck": true,
|
|
4
4
|
"module": "commonjs",
|
|
5
5
|
"esModuleInterop": true,
|
|
6
|
-
"target": "
|
|
6
|
+
"target": "ES2019",
|
|
7
7
|
"lib": [
|
|
8
8
|
"DOM",
|
|
9
|
-
"
|
|
10
|
-
"ES2020"
|
|
9
|
+
"ES2022"
|
|
11
10
|
],
|
|
12
11
|
"declaration": true,
|
|
13
12
|
"noImplicitAny": true,
|
|
@@ -37,4 +36,4 @@
|
|
|
37
36
|
"build",
|
|
38
37
|
"esm"
|
|
39
38
|
]
|
|
40
|
-
}
|
|
39
|
+
}
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED