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

required-as

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

required-as

Get a list of require()'d modules in a javascript module along with the names in module scope the module objects are assigned to.

  • 0.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Get the names and paths of modules required in a given module:

> var required_as = require('./lib/required-as');
undefined
> required_as('tests/fixtures/module.js');
[ { name: 'net', source: 'net' },
  { name: 'self', source: './module.js' },
  { name: 'required_as',
    source: '../../lib/required-as.js' } ]

from the module:

var net = require('net');
var self = require('./module.js');
var required_as = require('../../lib/required-as.js');

var not_a_module = 3;

FAQs

Package last updated on 07 Jun 2013

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