Socket
Socket
Sign inDemoInstall

symlinked

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    symlinked

Node utility to list packages that are npm linked


Version published
Maintainers
1
Install size
6.25 kB
Created

Readme

Source

symlinked

Node utility to list symlinks made by npm link, yarn link, or fs.link

Setup

Install via npm or yarn

npm install symlinked
yarn add symlinked

require

var symlinked = require("symlinked")

Methods

  • symlinked.names(dir: ".") get array of linked package names
  • symlinked.paths(dir: ".") get array of linked package paths
  • symlinked.roots(dir: ".") get array of linked package roots
  • symlinked.links(dir: ".") get array of linked package links
  • symlinked.deps(dir: ".") get array of linked modules names that are also dependencies
  • symlinked.is(path) test if path exists and is linked
  • symlinked.read(path) read link

Examples

Ran in package directory with said dependency linked on both ends

symlinked.names()
// [ 'said' ]
symlinked.paths()
// [ '/Users/jdoe/symlinked/node_modules/said' ]
symlinked.roots()
// [ '/Users/jdoe/symlinked/node_modules/said/node_modules' ]
symlinked.links()
// [ '/Users/said' ]
symlinked.deps()
// [ 'said' ]

Webpack resolve.modules configuration to resolve dependencies of linked dependencies

module.exports = {
  resolve: {
    modules: ["node_modules"].concat(symlinked.roots())
  }
}

Keywords

FAQs

Last updated on 07 May 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc