X-Git-Url: http://git.squeep.com/?p=squeep-chores;a=blobdiff_plain;f=lib%2Fcommon.js;fp=lib%2Fcommon.js;h=0000000000000000000000000000000000000000;hp=bdf8cf6a84fbc1f681298631c0e1037fd14b787b;hb=d71fcf409f4cfccb5e3866cca2ef134383d97816;hpb=d98a3c114eb33bd68477c0ca750e6f82b4d02964 diff --git a/lib/common.js b/lib/common.js deleted file mode 100644 index bdf8cf6..0000000 --- a/lib/common.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const path = require('path'); -const { name: packageName, version: packageVersion } = require('../package'); - -const libraryIdentifier = `${packageName}@${packageVersion}`; - -/** - * Return a function for decorating logging method scopes. - * @param {String} filename - */ -const fileScope = (filename) => { - const shortFilename = path.basename(filename, '.js'); - const fScope = (shortFilename === 'index') ? path.basename(path.dirname(filename)) : shortFilename; - return (scope) => [libraryIdentifier, fScope, scope].join(':'); -}; - -module.exports = { - fileScope, -}; \ No newline at end of file