same-author
Test to see if a file was written by you. Useful for babel/webpack conditional loading.
Install
npm install same-author
Usage
Babel
var sameAuthor = ; only: sameAuthor;
Webpack
... module: loaders: { // Uses the babel loader for both this app's code, but also any npm // dependencies that you wrote. return && /\.js$/; } loader: 'babel' ...
Standalone
;var isSameAuthor = ;// the second arg is optional. defaults to cwd.// in this example, process.cwd() is written by you, so this tests if your dependency "same-author" was also written by you.// isSameAuthor will be true for me, but not for you.