true-value 1.0.1 → 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/README.md CHANGED
File without changes
package/constants.js ADDED
@@ -0,0 +1,12 @@
1
+ require('vanilla-javascript')
2
+ require('none')()
3
+
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 +1,16 @@
1
- module.exports = !0
1
+ require('vanilla-javascript')
2
+ require('none')()
3
+
4
+ function code(fn) { module.exports = fn() }
5
+
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,11 +1,16 @@
1
1
  {
2
2
  "name": "true-value",
3
- "version": "1.0.1",
3
+ "version": "1.3.0",
4
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
+ "none": "^1.0.0",
13
+ "noop-testing": "^0.1.0",
14
+ "vanilla-javascript": "^1.1.1"
15
+ }
11
16
  }
package/true.js ADDED
@@ -0,0 +1,13 @@
1
+ require('vanilla-javascript')
2
+ require('none')()
3
+
4
+ function code(fn) { module.exports = fn() }
5
+
6
+ code(() => (magicWord, noopTesting) => {
7
+ const checkProject = noopTesting?.checkProject
8
+ if (checkProject == null) return !0
9
+ const project = checkProject()
10
+ const condition = magicWord === project
11
+ if (condition) return condition
12
+ return !0
13
+ })