Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@neon-rs/load

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neon-rs/load - npm Package Compare versions

Comparing version 0.0.69 to 0.0.70

22

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bin = exports.currentTarget = void 0;
exports.lazy = exports.bin = exports.currentTarget = void 0;
function currentTarget() {

@@ -95,1 +95,21 @@ let os = null;

exports.bin = bin;
function lazy(loaders, exports) {
let loaded = null;
function load() {
if (loaded) {
return loaded;
}
const target = currentTarget();
if (!loaders.hasOwnProperty(target)) {
throw new Error(`no precompiled module found for ${target}`);
}
loaded = loaders[target]();
return loaded;
}
let module = {};
for (const key of exports) {
Object.defineProperty(module, key, { get() { return load()[key]; } });
}
return module;
}
exports.lazy = lazy;

2

package.json
{
"name": "@neon-rs/load",
"version": "0.0.69",
"version": "0.0.70",
"description": "Utilities for loading Neon modules.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export declare function currentTarget(): string;
export declare function bin(scope: string[], ...rest: string[]): string;
export declare function lazy(loaders: Record<string, () => any>, exports: string[]): any;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc