New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gasket/utils

Package Overview
Dependencies
Maintainers
2
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/utils

Reusable utilities for Gasket internals

  • 5.0.0-canary.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
86
increased by32.31%
Maintainers
2
Weekly downloads
 
Created
Source

@gasket/utils

Reusable utilities for Gasket internals

Installation

npm i @gasket/utils

Functions

tryRequire

Tries to require a module, but ignores if it is not found. If not found, result will be null.

const { tryRequire } = require('@gasket/utils');

let someConfig = tryRequire('../might/be/a/path/to/some/file');

if(!someConfig) {
  someConfig = require('./default-config')
}

applyEnvironmentOverrides

Normalize the config by applying any environment or local overrides.

runShellCommand

Promise friendly wrapper to running a shell command (eg: git, npm, ls).

  • runShellCommand(command[, args][, options])
const { runShellCommand } = require('@gasket/utils');

async function helloWorld() {
  await runShellCommand('echo', ['hello world']);
}

License

MIT

Keywords

FAQs

Package last updated on 10 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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