Package Exports
- netrc
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (netrc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
netrc 
Parse netrc files
Usage
var netrc = require('netrc');
var myNetrc = netrc();
console.log(myNetrc['github.com'])
// { login: 'my-oauth-token',
// password: 'x-oauth-basic' }
myNetrc['github.com'].login = 'my-new-oauth-token';
netrc.save(myNetrc);
API
netrc([file])
Loads a .netrc
file, defaulting to ~/.netrc
netrc.parse(string)
Parses netrc formatted string into an object:
{
"machine1.example.com": {
"login": "my-login",
"password": "my-password"
},
"machine2.example.com": {
"login": "my-other-login",
"password": "my-other-password"
}
}
netrc.format(object)
Formats a netrc object into a valid string
netrc.save(object)
Persists a netrc object to ~/.netrc
Tests
$ npm test