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

get-yo-rc-path

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-yo-rc-path

Get the path of the nearest .yo-rc.json file

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
8
-20%
Maintainers
1
Weekly downloads
 
Created
Source

get-yo-rc-path

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Get the path of the nearest .yo-rc.json file

Install

npm install --save get-yo-rc-path

Usage

ES2015

// directory structure
// /user/
//   - home/
//     - awesome-project/
//       - script.js
//     - .yo-rc.json

// script.js
import getYoRcPath from 'get-yo-rc-path';

getYoRcPath().then(yoRcPath => {
  // => yoRcPath = '/user/home/.yo-rc.json'
});

getYoRcPath.dir().then(yoRcDir => {
  // => yoRcPath = '/user/home'
});

ES5

// directory structure
// /user/
//   - home/
//     - awesome-project/
//       - script.js
//     - .yo-rc.json

// script.js
var getYoRcPath = require('get-yo-rc-path');

getYoRcPath().then(function (yoRcPath) {
  // => yoRcPath = '/user/home/.yo-rc.json'
});

getYoRcPath.dir().then(function (yoRcDir) {
  // => yoRcPath = '/user/home'
});

API

getYoRcPath()

Returns a Promise that resolves to a String of the full path or null if not found.

getYoRcPath.dir()

Returns a Promise that resolves to a String of the directory or null if not found.

LICENSE

MIT © Dustin Specker

Keywords

yo-rc

FAQs

Package last updated on 27 Oct 2015

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