bump package version to 2.0.3
[squeep-mystery-box] / lib / common.js
diff --git a/lib/common.js b/lib/common.js
deleted file mode 100644 (file)
index 4c7e639..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-const path = require('path');
-const { randomBytes } = require('crypto');
-const { promisify } = require('util');
-const randomBytesAsync = promisify(randomBytes);
-
-
-/**
- * Return a function which combines a part of the filename with a scope, for use in logging.
- * @param {string} filename
- */
-const fileScope = (filename) => {
-  let fScope = path.basename(filename, '.js');
-  if (fScope === 'index') {
-    fScope = path.basename(path.dirname(filename));
-  }
-  return (scope) => `${fScope}:${scope}`;
-}
-
-
-module.exports = {
-  fileScope,
-  randomBytesAsync,
-};
\ No newline at end of file