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.19 to 0.0.20

25

dist/index.js

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.currentTarget = void 0;
exports.custom = exports.scope = exports.debug = exports.currentTarget = void 0;
const path = __importStar(require("path"));

@@ -103,17 +103,10 @@ const fs = __importStar(require("fs"));

}
function load(options) {
let debugModule = null;
if (options.debug && (debugModule = debug(options.debug))) {
return debugModule;
}
if ("dir" in options) {
return require(path.join(options.dir, "index.node"));
}
if ("scope" in options) {
return require(options.scope + "/" + currentTarget());
}
if ("custom" in options) {
return require(options.custom(currentTarget()));
}
exports.debug = debug;
function scope(scope) {
return require(scope + "/" + currentTarget());
}
exports.default = load;
exports.scope = scope;
function custom(toRequireSpec) {
return require(toRequireSpec(currentTarget()));
}
exports.custom = custom;
{
"name": "@neon-rs/load",
"version": "0.0.19",
"version": "0.0.20",
"description": "Utilities for loading Neon modules.",

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

export declare function currentTarget(): string;
export type LoadDir = {
debug?: string;
dir: string;
};
export type LoadScope = {
debug?: string;
scope: string;
};
export type LoadCustom = {
debug?: string;
custom: (target: string) => string;
};
export type LoadOptions = LoadDir | LoadScope | LoadCustom;
export default function load(options: LoadOptions): any;
export declare function debug(dirname: string): any;
export declare function scope(scope: string): any;
export declare function custom(toRequireSpec: (target: string) => 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