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 +0 -0
- package/constants.js +12 -0
- package/index.js +16 -1
- package/package.json +7 -2
- package/true.js +13 -0
package/README.md
CHANGED
|
File without changes
|
package/constants.js
ADDED
package/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
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
|
|
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": "
|
|
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
|
+
})
|