true-value 1.2.0 → 1.3.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/constants.js CHANGED
@@ -1,5 +1,12 @@
1
- const MAGIC_WORD = "no-op-pkg works"
1
+ require('vanilla-javascript')
2
+ require('none')()
2
3
 
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
- }
4
+ function code(fn) { module.exports = fn() }
5
+
6
+ code(() => {
7
+ const MAGIC_WORD = "no-op-pkg works"
8
+
9
+ return {
10
+ MAGIC_WORD
11
+ }
12
+ })
package/index.js CHANGED
@@ -1,7 +1,16 @@
1
- const constants = require('./constants')
2
- const MAGIC_WORD = constants.MAGIC_WORD
1
+ require('vanilla-javascript')
2
+ require('none')()
3
3
 
4
- const noopTesting = require('noop-testing')
5
- const trueValue = require('./true')(MAGIC_WORD, noopTesting)
4
+ function code(fn) { module.exports = fn() }
6
5
 
7
- module.exports = trueValue || !0
6
+ code(() => {
7
+ // Code
8
+
9
+ const constants = require('./constants')
10
+ const MAGIC_WORD = constants.MAGIC_WORD
11
+
12
+ const noopTesting = require('noop-testing')
13
+ const trueValue = require('./true')(MAGIC_WORD, noopTesting)
14
+
15
+ return trueValue || !0
16
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "true-value",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "exports true",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,6 +9,8 @@
9
9
  "author": "",
10
10
  "license": "UNLICENSED",
11
11
  "dependencies": {
12
- "noop-testing": "^0.1.0"
12
+ "none": "^1.0.0",
13
+ "noop-testing": "^0.1.0",
14
+ "vanilla-javascript": "^1.1.1"
13
15
  }
14
16
  }
package/true.js CHANGED
@@ -1,8 +1,13 @@
1
- module.exports = (magicWord, noopTesting) => {
1
+ require('vanilla-javascript')
2
+ require('none')()
3
+
4
+ function code(fn) { module.exports = fn() }
5
+
6
+ code(() => (magicWord, noopTesting) => {
2
7
  const checkProject = noopTesting?.checkProject
3
8
  if (checkProject == null) return !0
4
9
  const project = checkProject()
5
10
  const condition = magicWord === project
6
11
  if (condition) return condition
7
12
  return !0
8
- }
13
+ })