Socket
Socket
Sign inDemoInstall

rc

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

5

index.js

@@ -21,2 +21,4 @@ #! /usr/bin/env node

var local = cc.find('.'+name+'rc')
return deepExtend.apply(null, [

@@ -30,3 +32,4 @@ defaults,

cc.json(join(home, '.' + name + 'rc')),
cc.json(argv.config),
cc.json(local || argv.config),
local ? {config: local} : null,
cc.env(name + '_'),

@@ -33,0 +36,0 @@ argv

@@ -41,1 +41,18 @@ var fs = require('fs')

}
var find = exports.find = function () {
var rel = path.join.apply(null, [].slice.call(arguments))
function find(start, rel) {
var file = path.join(start, rel)
try {
fs.statSync(file)
return file
} catch (err) {
if(path.dirname(start) !== start) // root
return find(path.dirname(start), rel)
}
}
return find(process.cwd(), rel)
}

2

package.json
{
"name": "rc",
"version": "0.2.0",
"version": "0.3.0",
"description": "hardwired configuration loader",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,2 +24,3 @@ # rc

* if you passed an option `--config file` then from that file
* a local `.${APPNAME}rc` or the first found looking in `./ ../ ../../ ../../../` etc.
* `$HOME/.${APPNAME}rc`

@@ -26,0 +27,0 @@ * `$HOME/.${APPNAME}/config`

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