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.168 to 0.0.169

69

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

@@ -137,1 +137,68 @@ let os = null;

exports.lazy = lazy;
function __UNSTABLE_loader(loaders) {
const target = currentTarget();
if (!loaders.hasOwnProperty(target)) {
throw new Error(`no precompiled module found for ${target}`);
}
const loader = loaders[target];
let loaded = null;
return () => {
if (loaded) {
return loaded;
}
loaded = loader();
return loaded;
};
}
exports.__UNSTABLE_loader = __UNSTABLE_loader;
function __UNSTABLE_proxy(loaders) {
const target = currentTarget();
if (!loaders.hasOwnProperty(target)) {
throw new Error(`no precompiled module found for ${target}`);
}
const loader = loaders[target];
let loaded = null;
function load() {
if (!loaded) {
loaded = loader();
}
return loaded;
}
const handler = {
has(_target, key) {
return Reflect.has(load(), key);
},
get(_target, key) {
return Reflect.get(load(), key);
},
ownKeys(_target) {
return Reflect.ownKeys(load());
},
defineProperty(_target, _key, _descriptor) {
throw new Error('attempt to modify read-only Neon module proxy');
},
deleteProperty(_target, _key) {
throw new Error('attempt to modify read-only Neon module proxy');
},
set(_target, _key, _val) {
throw new Error('attempt to modify read-only Neon module proxy');
},
setPrototypeOf(_target, _proto) {
throw new Error('attempt to modify read-only Neon module proxy');
},
getPrototypeOf(_target) {
return Object.getPrototypeOf(load());
},
isExtensible(_target) {
return Reflect.isExtensible(load());
},
preventExtensions(_target) {
return Reflect.preventExtensions(load());
},
getOwnPropertyDescriptor(_target, key) {
return Reflect.getOwnPropertyDescriptor(load(), key);
}
};
return new Proxy({}, handler);
}
exports.__UNSTABLE_proxy = __UNSTABLE_proxy;

2

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

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

@@ -10,1 +10,3 @@ export declare function currentTarget(): string;

export declare function lazy(options: LazyOptions): any;
export declare function __UNSTABLE_loader(loaders: Record<string, () => Record<string, any>>): () => Record<string, any>;
export declare function __UNSTABLE_proxy(loaders: Record<string, () => Record<string, any>>): 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