@neon-rs/load 0.0.34 → 0.0.36
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/dist/index.js +13 -12
- package/package.json +1 -1
- package/types/index.d.ts +1 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bin = exports.
|
|
4
|
-
const node_module_1 = require("node:module");
|
|
3
|
+
exports.bin = exports.currentTarget = void 0;
|
|
5
4
|
function currentTarget() {
|
|
6
5
|
let os = null;
|
|
7
6
|
switch (process.platform) {
|
|
@@ -78,16 +77,18 @@ function isGlibc() {
|
|
|
78
77
|
// const pathSpec = path.join(...components);
|
|
79
78
|
// return fs.existsSync(pathSpec) ? require(pathSpec) : null;
|
|
80
79
|
// }
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
function* interleave(a1, a2) {
|
|
81
|
+
const length = Math.max(a1.length, a2.length);
|
|
82
|
+
for (let i = 0; i < length; i++) {
|
|
83
|
+
if (i < a1.length) {
|
|
84
|
+
yield a1[i];
|
|
85
|
+
}
|
|
86
|
+
if (i < a2.length) {
|
|
87
|
+
yield a2[i];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return scope + "/" + currentTarget();
|
|
91
|
+
function bin(scope, ...rest) {
|
|
92
|
+
return [...interleave(scope, rest)].join("") + "/" + currentTarget();
|
|
92
93
|
}
|
|
93
94
|
exports.bin = bin;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export declare function currentTarget(): string;
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function custom(toRequireSpec: (target: string) => string): any;
|
|
4
|
-
export declare function bin(scope: string): string;
|
|
2
|
+
export declare function bin(scope: string[], ...rest: string[]): string;
|