@neon-rs/load 0.0.34 → 0.0.35

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 CHANGED
@@ -87,7 +87,18 @@ function custom(toRequireSpec) {
87
87
  return requireAbsolute(toRequireSpec(currentTarget()));
88
88
  }
89
89
  exports.custom = custom;
90
- function bin(scope) {
91
- return scope + "/" + currentTarget();
90
+ function* interleave(a1, a2) {
91
+ const length = Math.max(a1.length, a2.length);
92
+ for (let i = 0; i < length; i++) {
93
+ if (i < a1.length) {
94
+ yield a1[i];
95
+ }
96
+ if (i < a2.length) {
97
+ yield a2[i];
98
+ }
99
+ }
100
+ }
101
+ function bin(scope, ...rest) {
102
+ return [...interleave(scope, rest)].join("") + "/" + currentTarget();
92
103
  }
93
104
  exports.bin = bin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon-rs/load",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "Utilities for loading Neon modules.",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export declare function currentTarget(): string;
2
2
  export declare function scope(scope: string): any;
3
3
  export declare function custom(toRequireSpec: (target: string) => string): any;
4
- export declare function bin(scope: string): string;
4
+ export declare function bin(scope: string[], ...rest: string[]): string;