Socket
Socket
Sign inDemoInstall

source

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source

Grab all of the source files from a package


Version published
Weekly downloads
2.9K
increased by4.21%
Maintainers
0
Weekly downloads
 
Created
Source

source

Grab all of the source files from a package.

methods

modules

Returns an object with top-level names mapped to file contents.

The 'package.json' key is special in that it contains a JSON.parse()'d Object instead of a Buffer with the contents.

examples

traverse

var source = require('source')
console.dir(Object.keys(
    source.modules('traverse')
));

[ 'traverse', 'traverse/package.json' ]

jade

var source = require('source')
console.dir(Object.keys(
    source.modules('jade')
));

[ 'jade',
  'jade/package.json',
  'jade/lib/jade.js',
  'jade/lib/compiler.js',
  'jade/lib/utils.js',
  'jade/lib/self-closing.js',
  'jade/lib/index.js',
  'jade/lib/._parser.js',
  'jade/lib/lexer.js',
  'jade/lib/parser.js',
  'jade/lib/._doctypes.js',
  'jade/lib/._self-closing.js',
  'jade/lib/doctypes.js',
  'jade/lib/filters.js',
  'jade/lib/nodes/tag.js',
  'jade/lib/nodes/filter.js',
  'jade/lib/nodes/doctype.js',
  'jade/lib/nodes/code.js',
  'jade/lib/nodes/._each.js',
  'jade/lib/nodes/block.js',
  'jade/lib/nodes/index.js',
  'jade/lib/nodes/._block.js',
  'jade/lib/nodes/._code.js',
  'jade/lib/nodes/._text.js',
  'jade/lib/nodes/comment.js',
  'jade/lib/nodes/text.js',
  'jade/lib/nodes/each.js',
  'jade/lib/nodes/node.js',
  'jade/lib/._filters.js',
  'jade/lib/._jade.js',
  'jade/._index' ]

FAQs

Package last updated on 23 Feb 2011

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