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

run-func

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

run-func - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

16

index.js
#! /usr/bin/env node
const path = require('path');
const params = process.argv.slice(4);
const userModule = require('../../' + process.argv[2]);
if (!process.argv[2]) {
console.error('File name not provided i.e. run-func ./index.js');
process.exit();
}
if (!process.argv[3]) {
console.error('Function name not provided i.e. run-func ./index.js default');
process.exit();
}
const userModule = require(path.join(process.cwd(), process.argv[2]));
if (!userModule) {

@@ -13,2 +24,1 @@ throw new Error(`Module ${userModule} does not exists`);

userModule[process.argv[3]](...params);
#! /usr/bin/env node --max-old-space-size=4096
const path = require('path');
const params = process.argv.slice(4);
const userModule = require('../../' + process.argv[2]);
if (!process.argv[2]) {
console.error('File name not provided i.e. run-func ./index.js');
process.exit();
}
if (!process.argv[3]) {
console.error('Function name not provided i.e. run-func ./index.js default');
process.exit();
}
const userModule = require(path.join(process.cwd(), process.argv[2]));
if (!userModule) {

@@ -13,2 +24,1 @@ throw new Error(`Module ${userModule} does not exists`);

userModule[process.argv[3]](...params);

2

package.json

@@ -25,3 +25,3 @@ {

},
"version": "1.0.2",
"version": "1.0.3",
"repository": {

@@ -28,0 +28,0 @@ "type": "git",

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