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

x-paths

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-paths

A module for getting a path of the workspace directories and files.

latest
npmnpm
Version
1.2.20
Version published
Weekly downloads
22
450%
Maintainers
1
Weekly downloads
 
Created
Source

x-paths

A module for getting a path of the workspace directories and files.

Installation

Install using npm:

$ npm install x-paths

Usage

Directory Structure:

/home/yourhome/projectroot
├── app.js
├── foo
│   ├── foos.js
│   └── baz
│       └── users.js ---(1)
└── bar
    ├── bars.js
    └── baz
        └── index.js ---(2)

~/yourhome/projectroot$ node app.js

app.js:

const Paths = require('x-paths');

console.log(Paths.search('baz/users.js'));      // /home/yourhome/projectroot/foo/baz/users.js
console.log(Paths.search('baz/index.js'));      // /home/yourhome/projectroot/bar/baz/index.js

Note: You can see the source code and understand its methods.

License

MIT

Keywords

workspace

FAQs

Package last updated on 28 Oct 2016

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