New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

deep-require-cwd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-require-cwd

Require a module like `require()` but via a sequence of nested packages from the current working directory

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
4.3K
-38.36%
Maintainers
1
Weekly downloads
 
Created
Source

deep-require-cwd

Require a module like `require()` but via a sequence of nested packages from the current working directory

npm version Build Status

Installation

npm i -S deep-require-cwd

Usage

'use strict'
const deepRequireCwd = require('deep-require-cwd')

const pkg = deepRequireCwd(['mos', 'chalk', './package.json'])

console.log(pkg.name)
//> chalk

API

deepRequireCwd(moduleIds)

Like require(), throws when the module can't be found.

deepRequireCwd.silent(moduleIds)

Returns null instead of throwing when the module can't be found.

moduleIds

Type: string[]

An array of module IDs, a module ID is something that you pass to require().

  • deep-require-from - Require a module like require() but via a sequence of nested packages
  • deep-resolve-from - Resolve the path of a module through a sequence of packages
  • deep-resolve-cwd - Resolve the path of a module through a sequence of packages from the current working directory
  • req-cwd - Require a module like require() but from the current working directory

License

MIT © Zoltan Kochan

Keywords

require

FAQs

Package last updated on 08 May 2017

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