Skip to content

Commit

Permalink
rename unparse to format
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmason committed May 18, 2013
1 parent 05d5fc0 commit c7e5730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ exports.parse = function(content) {
* @param {Object} machines as returned by `netrc.parse`
* @return {String} text of the netrc file
*/
exports.unparse = function(machines){
exports.format = function format(machines){
var lines = [],
keys = Object.getOwnPropertyNames(machines).sort();
keys.forEach(function(key){
Expand Down
4 changes: 2 additions & 2 deletions test/netrc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ describe("netrc", function() {
});
});

describe('unparse', function(){
describe('format', function(){
it('should generate text that parses to the original', function(){
var machines = netrc.parse(valid);

var text = netrc.unparse(machines);
var text = netrc.format(machines);
should.exist(text);
text.should.include('machine github.com');
text.should.include('login CamShaft');
Expand Down

0 comments on commit c7e5730

Please sign in to comment.