@nxtedition/slice 1.1.5 → 1.1.7
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/lib/index.js +7 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -209,7 +209,13 @@ export class Slice {
|
|
|
209
209
|
offset += this.byteOffset
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
const available = this.byteOffset + this.byteLength - offset
|
|
213
|
+
if (available <= 0) {
|
|
214
|
+
return
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const end = source.byteLength < available ? source.byteLength : available
|
|
218
|
+
source.copy(this.buffer, offset, 0, end)
|
|
213
219
|
}
|
|
214
220
|
|
|
215
221
|
at(index ) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/slice",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "rimraf lib && tsc && amaroc ./src/index.ts && mv src/index.js lib/",
|
|
17
|
+
"build": "rimraf lib && tsc -p tsconfig.build.json && amaroc ./src/index.ts && mv src/index.js lib/",
|
|
18
18
|
"prepublishOnly": "yarn build",
|
|
19
19
|
"typecheck": "tsc --noEmit",
|
|
20
20
|
"test": "yarn build && node --test",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"tsd": "^0.33.0",
|
|
31
31
|
"typescript": "^5.9.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "7c9c7457c885c644c7a1e70ef894d4727ce240d6"
|
|
34
34
|
}
|