Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doctoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,8 @@ for (var i = 0; i < argv._.length; i++) {

console.log('\nEverything is OK.');
}

module.exports.transform=function(content, mode, maxHeaderLevel, title, notitle, entryPrefix){
return transform(content, mode, maxHeaderLevel, title, notitle, entryPrefix);
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could write this more simply as

module.exports.transform = transform

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i agree. sorry i'm new to nodejs i just needed the API

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, just go ahead and make that change and I'll merge it in. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!