true-value 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
File without changes
package/constants.js ADDED
@@ -0,0 +1,5 @@
1
+ const MAGIC_WORD = "no-op-pkg works"
2
+
3
+ module.exports = {
4
+ MAGIC_WORD // If I ever have to use this magic word other than creating this utterly pointless library I will go out of my mind
5
+ }
package/index.js CHANGED
@@ -1 +1,7 @@
1
- module.exports = true
1
+ const constants = require('./constants')
2
+ const MAGIC_WORD = constants.MAGIC_WORD
3
+
4
+ const noopTesting = require('noop-testing')
5
+ const trueValue = require('./true')(MAGIC_WORD, noopTesting)
6
+
7
+ module.exports = trueValue || !0
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "true-value",
3
- "version": "1.0.0",
4
- "description": "True",
3
+ "version": "1.2.0",
4
+ "description": "exports true",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "author": "",
10
- "license": "ISC"
10
+ "license": "UNLICENSED",
11
+ "dependencies": {
12
+ "noop-testing": "^0.1.0"
13
+ }
11
14
  }
package/true.js ADDED
@@ -0,0 +1,8 @@
1
+ module.exports = (magicWord, noopTesting) => {
2
+ const checkProject = noopTesting?.checkProject
3
+ if (checkProject == null) return !0
4
+ const project = checkProject()
5
+ const condition = magicWord === project
6
+ if (condition) return condition
7
+ return !0
8
+ }