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

@marcopeg/utils

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marcopeg/utils

Javascript utils for server and client projects

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

utils

Javascript utils for server and client projects

config

const config = require('@marcopeg/utils/lib/config)

// will trigger an error if the env variable is not defined
const serverPort = config.get('SERVER_PORT')

// will return a default vailue if the env variable is not defined
const appName = config.get('APP_NAME', 'Default App Name')

// (process.env.NODE_ENV === 'development')
if (config.isDev()) {
    ...
}

pause

const pause = require('@marcopeg/utils/lib/pause)

async function foo () {
    console.log('before')
    await pause(2000) // stop process for 2s
    console.log('after')
}

getErrorOrigin

Improve errors stack trace

FAQs

Package last updated on 05 May 2018

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