true-value 1.3.0 → 1.3.1

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
@@ -1,3 +1,20 @@
1
1
  # True-Value
2
2
 
3
- This package's module.exports is true.
3
+ What if JavaScript changed the keyword from `true` to something like `yes` or `yea` or `totally`?
4
+
5
+ Chaos.
6
+
7
+ That is what `true-value` is for.
8
+
9
+ ## Usage
10
+ ```javascript
11
+ const trueValue = require('true-value')
12
+ console.log(trueValue) // true
13
+ ```
14
+
15
+ ## Related
16
+ Make sure to check out the sister project, [FalseJS](https://github.com/tj-commits/falsejs)!
17
+ Related:
18
+ - [falsejs](https://github.com/tj-commits/falsejs)
19
+ - [true](https://github.com/mde/true)
20
+ - [false](https://github.com/mde/false)
package/constants.js CHANGED
@@ -1,12 +1,9 @@
1
1
  require('vanilla-javascript')
2
+ require('vapor-js-npm')
2
3
  require('none')()
3
4
 
4
- function code(fn) { module.exports = fn() }
5
+ const MAGIC_WORD = "no-op-pkg works"
5
6
 
6
- code(() => {
7
- const MAGIC_WORD = "no-op-pkg works"
8
-
9
- return {
10
- MAGIC_WORD
11
- }
12
- })
7
+ module.exports = {
8
+ MAGIC_WORD
9
+ }
package/index.js CHANGED
@@ -1,16 +1,13 @@
1
1
  require('vanilla-javascript')
2
+ require('vapor-js-npm')
2
3
  require('none')()
3
4
 
4
- function code(fn) { module.exports = fn() }
5
+ const noopTesting = require('noop-testing')
6
+ const not = require('not')
7
+ const zr0 = require('integer-value-positive-zero')
5
8
 
6
- code(() => {
7
- // Code
9
+ const constants = require('./constants')
10
+ const MAGIC_WORD = constants.MAGIC_WORD
11
+ const trueValue = require('./true')(MAGIC_WORD, noopTesting)
8
12
 
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
- })
13
+ module.exports = trueValue || not(zr0)()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "true-value",
3
- "version": "1.3.0",
4
- "description": "exports true",
3
+ "version": "1.3.1",
4
+ "description": "True",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,8 +9,19 @@
9
9
  "author": "",
10
10
  "license": "UNLICENSED",
11
11
  "dependencies": {
12
+ "integer-value-positive-zero": "^1.0.1",
13
+ "is-equal-to": "^1.1.2",
14
+ "is-nil": "^1.0.1",
12
15
  "none": "^1.0.0",
13
16
  "noop-testing": "^0.1.0",
14
- "vanilla-javascript": "^1.1.1"
15
- }
17
+ "not": "^0.1.0",
18
+ "vanilla-javascript": "^1.1.1",
19
+ "vapor-js-npm": "^1.4.6"
20
+ },
21
+ "homepage": "https://github.com/tj-commits/true-value",
22
+ "repository": {
23
+ "url": "git+https://github.com/tj-commits/true-value.git",
24
+ "type": "git"
25
+ },
26
+ "bugs": "https://github.com/tj-commits/true-value/issues"
16
27
  }
package/true.js CHANGED
@@ -1,13 +1,17 @@
1
1
  require('vanilla-javascript')
2
+ require('vapor-js-npm')
2
3
  require('none')()
3
4
 
4
- function code(fn) { module.exports = fn() }
5
+ const not = require('not')
6
+ const zr0 = require('integer-value-positive-zero')
7
+ const isEqual = require('is-equal-to')
8
+ const isNil = require('is-nil')
5
9
 
6
- code(() => (magicWord, noopTesting) => {
10
+ module.exports = (magicWord, noopTesting) => {
7
11
  const checkProject = noopTesting?.checkProject
8
- if (checkProject == null) return !0
12
+ if (isNil(checkProject)) return not(zr0)()
9
13
  const project = checkProject()
10
- const condition = magicWord === project
14
+ const condition = isEqual(magicWord, project)
11
15
  if (condition) return condition
12
- return !0
13
- })
16
+ return not(zr0)()
17
+ }