functionalscript 0.0.364 → 0.0.368
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/doc/README.md +2 -1
- package/package.json +2 -2
- package/test.f.cjs +1 -0
- package/types/option/test.f.cjs +11 -0
package/doc/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Documentation
|
|
2
2
|
|
|
3
3
|
FunctionalScript files have `.f.cjs` file extensions because it's using a `Common.JS` module system. See
|
|
4
|
-
[ESM. Resolver Algorithm Specification](https://nodejs.org/api/esm.html#resolver-algorithm-specification)
|
|
4
|
+
[ESM. Resolver Algorithm Specification](https://nodejs.org/api/esm.html#resolver-algorithm-specification)
|
|
5
|
+
and [ESM. Enabling](https://nodejs.org/docs/latest-v13.x/api/esm.html#esm_enabling).
|
|
5
6
|
|
|
6
7
|
## 1. Creating a New Repository
|
|
7
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functionalscript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.368",
|
|
4
4
|
"description": "FunctionalScript is a functional subset of JavaScript",
|
|
5
5
|
"main": "main.f.cjs",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/functionalscript/functionalscript#readme",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^18.
|
|
32
|
+
"@types/node": "^18.6.2",
|
|
33
33
|
"typescript": "^4.7.4"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/test.f.cjs
CHANGED
|
@@ -13,6 +13,7 @@ require('./commonjs/package/test.f.cjs')
|
|
|
13
13
|
require('./commonjs/path/test.f.cjs')
|
|
14
14
|
require('./types/function/compare/test.f.cjs')
|
|
15
15
|
require('./types/stringset/test.f.cjs')
|
|
16
|
+
require('./types/option/test.f.cjs')
|
|
16
17
|
require('./commonjs/build/test.f.cjs')
|
|
17
18
|
require('./types/range/test.f.cjs')
|
|
18
19
|
require('./html/test.f.cjs')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const _ = require('./main.f.cjs')
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
const optionSq = _.map(v => v * v)
|
|
5
|
+
const sq3 = optionSq(3)
|
|
6
|
+
if (sq3 !== 9) { throw sq3 }
|
|
7
|
+
const sqUndefined = optionSq(undefined)
|
|
8
|
+
if (sqUndefined !== undefined) { throw sqUndefined }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {}
|