netrc
0.1.4 • Public • Published netrc 
Parse netrc files
Usage
var netrc = require('netrc');
var myNetrc = netrc();
console.log(myNetrc['github.com'])
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
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
0.1.4 | 135,369 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
0.1.4 | 135,369 | |
0.1.3 | 2,884 | |
0.1.2 | 4 | |
0.1.1 | 5 | |
0.1.0 | 1 | |
Package Sidebar
Install
Weekly Downloads