functionalscript 0.0.343 → 0.0.350
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/.github/workflows/node.js.yml +2 -0
- package/.github/workflows/npm-publish.yml +1 -1
- package/LANGUAGE.md +40 -0
- package/commonjs/README.md +14 -8
- package/commonjs/build/{index.js → main.f.js} +14 -8
- package/commonjs/build/{test.js → test.f.js} +6 -6
- package/commonjs/main.f.js +20 -0
- package/commonjs/module/function/{index.js → main.f.js} +1 -1
- package/commonjs/module/{index.js → main.f.js} +3 -1
- package/commonjs/package/dependencies/{index.js → main.f.js} +3 -3
- package/commonjs/package/dependencies/{test.js → test.f.js} +1 -1
- package/commonjs/package/{index.js → main.f.js} +8 -3
- package/commonjs/package/{test.js → test.f.js} +2 -2
- package/commonjs/path/{index.js → main.f.js} +3 -3
- package/commonjs/path/{test.js → test.f.js} +7 -7
- package/dev/{index.js → main.f.js} +0 -0
- package/html/{index.js → main.f.js} +3 -4
- package/html/{test.js → test.f.js} +1 -1
- package/io/commonjs/{index.js → main.js} +3 -3
- package/io/commonjs/test.js +2 -2
- package/io/nodejs/version/{index.js → main.js} +0 -0
- package/io/result/{index.js → main.js} +1 -1
- package/json/{index.js → main.f.js} +31 -29
- package/json/{test.js → test.f.js} +3 -3
- package/json/tokenizer/{index.js → main.f.js} +3 -3
- package/json/tokenizer/{test.js → test.f.js} +4 -4
- package/main.f.js +14 -0
- package/package.json +6 -5
- package/sha2/{index.js → main.f.js} +1 -1
- package/sha2/{test.js → test.f.js} +4 -4
- package/test.f.js +78 -0
- package/types/array/{index.js → main.f.js} +1 -2
- package/types/array/{test.js → test.f.js} +3 -3
- package/types/btree/find/{index.js → main.f.js} +4 -4
- package/types/btree/find/{test.js → test.f.js} +7 -7
- package/types/btree/main.f.js +40 -0
- package/types/btree/remove/{index.js → main.f.js} +6 -6
- package/types/btree/remove/{test.js → test.f.js} +6 -6
- package/types/btree/set/{index.js → main.f.js} +4 -4
- package/types/btree/set/{test.js → test.f.js} +5 -5
- package/types/btree/{test.js → test.f.js} +11 -11
- package/types/btree/{index.js → types/main.f.js} +1 -33
- package/types/function/compare/{index.js → main.f.js} +1 -1
- package/types/function/compare/{test.js → test.f.js} +1 -1
- package/types/function/{index.js → main.f.js} +4 -0
- package/types/function/operator/{index.js → main.f.js} +0 -0
- package/types/list/{index.js → main.f.js} +3 -3
- package/types/list/{test.js → test.f.js} +4 -4
- package/types/main.f.js +20 -0
- package/types/map/{index.js → main.f.js} +10 -9
- package/types/map/{test.js → test.f.js} +3 -3
- package/types/object/{index.js → main.f.js} +2 -2
- package/types/object/{test.js → test.f.js} +1 -1
- package/types/option/{index.js → main.f.js} +0 -0
- package/types/range/{index.js → main.f.js} +0 -0
- package/types/range/{test.js → test.f.js} +1 -1
- package/types/result/{index.js → main.f.js} +0 -0
- package/types/{stringSet/index.js → stringset/main.f.js} +9 -10
- package/types/{stringSet/test.js → stringset/test.f.js} +1 -1
- package/commonjs/index.js +0 -11
- package/index.js +0 -76
- package/test.js +0 -125
package/test.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
const i = require('./index.js')
|
|
2
|
-
|
|
3
|
-
require('./types/list/test.js')
|
|
4
|
-
require('./types/array/test.js')
|
|
5
|
-
require('./types/btree/test.js')
|
|
6
|
-
require('./sha2/test.js')
|
|
7
|
-
require('./json/test.js')
|
|
8
|
-
require('./json/tokenizer/test.js')
|
|
9
|
-
require('./types/object/test.js')
|
|
10
|
-
require('./io/commonjs/test.js')
|
|
11
|
-
require('./commonjs/package/dependencies/test.js')
|
|
12
|
-
require('./commonjs/package/test.js')
|
|
13
|
-
require('./commonjs/path/test.js')
|
|
14
|
-
require('./types/function/compare/test.js')
|
|
15
|
-
require('./types/stringSet/test.js')
|
|
16
|
-
require('./commonjs/build/test.js')
|
|
17
|
-
require('./types/range/test.js')
|
|
18
|
-
require('./html/test.js')
|
|
19
|
-
|
|
20
|
-
/** @type {() => never} */
|
|
21
|
-
const assert = () => { throw 'assert' }
|
|
22
|
-
|
|
23
|
-
/** @type {(_: boolean) => void} */
|
|
24
|
-
const assert_if = c => { if (c) { throw 'assert_if' } }
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
i.parseModuleUrl('')(
|
|
28
|
-
assert,
|
|
29
|
-
e => assert_if(e.id !== 'expected' || e.params[0] !== ':'))
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
i.parseModuleUrl(':')(
|
|
34
|
-
assert,
|
|
35
|
-
e => assert_if(e.id !== 'unknownProtocol'))
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
i.parseModuleUrl('github:r')(
|
|
40
|
-
assert,
|
|
41
|
-
e => assert_if(e.id !== 'expected'))
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
i.parseModuleUrl('github:functionalscript/node-example')(
|
|
46
|
-
v => assert_if(
|
|
47
|
-
v.repo.org !== 'functionalscript' ||
|
|
48
|
-
v.repo.name !== 'node-example' ||
|
|
49
|
-
'branch' in v),
|
|
50
|
-
assert)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
i.parseModuleUrl('github:functionalscript/node-example#main')(
|
|
55
|
-
v => assert_if(
|
|
56
|
-
v.repo.org !== 'functionalscript' ||
|
|
57
|
-
v.repo.name !== 'node-example' ||
|
|
58
|
-
!('branch' in v) ||
|
|
59
|
-
v.branch !== 'main'),
|
|
60
|
-
assert)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
i.parseModuleUrl('github:functionalscript/node-example#4b14a7a2b11cf53f037931eb7bef240f96dcea64')(
|
|
65
|
-
v => assert_if(
|
|
66
|
-
v.repo.org !== 'functionalscript' ||
|
|
67
|
-
v.repo.name !== 'node-example' ||
|
|
68
|
-
!('commit' in v) ||
|
|
69
|
-
v.commit !== '4b14a7a2b11cf53f037931eb7bef240f96dcea64'),
|
|
70
|
-
assert)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
const c = (()=>{})['constructor']
|
|
75
|
-
const f = c('return 5')
|
|
76
|
-
const result = f()
|
|
77
|
-
if (result !== 5) { throw 'function' }
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
/** @type {any} */
|
|
82
|
-
const o = {}
|
|
83
|
-
const c = o['constructor']
|
|
84
|
-
// console.log(c)
|
|
85
|
-
// console.log(c(()=>{}))
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
/** @type {any} */
|
|
90
|
-
const o = {
|
|
91
|
-
constructor: undefined
|
|
92
|
-
}
|
|
93
|
-
const c = o['constructor']
|
|
94
|
-
//console.log(c)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
/** @type {any} */
|
|
99
|
-
const b = '42'
|
|
100
|
-
const r = Number(b)
|
|
101
|
-
//console.log(r)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
{
|
|
105
|
-
/** @type {any} */
|
|
106
|
-
const o = {}
|
|
107
|
-
//const c = o['constructor']
|
|
108
|
-
//const c = o['__proto__']
|
|
109
|
-
//const c = o['__defineGetter__']
|
|
110
|
-
//const c = o['__defineSetter__']
|
|
111
|
-
//const c = o['__lookupGetter__']
|
|
112
|
-
//const c = o['__lookupSetter__']
|
|
113
|
-
//const c = o['hasOwnProperty']
|
|
114
|
-
//const c = o['isPrototypeOf']
|
|
115
|
-
//const c = o['propertyIsEnumerable']
|
|
116
|
-
//const c = o['toString']
|
|
117
|
-
const c = o['valueOf']
|
|
118
|
-
//console.log(c)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
const x = { 'a': 12 }
|
|
123
|
-
const c = Object.getOwnPropertyDescriptor(x, 'constructor')
|
|
124
|
-
const a = Object.getOwnPropertyDescriptor(x, 'a')
|
|
125
|
-
}
|