ctx-core 2.0.0 → 2.2.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/LICENSE +201 -0
- package/README.md +2 -0
- package/array/index.d.ts +85 -0
- package/array/index.js +85 -0
- package/atob/index.d.ts +2 -0
- package/atob/index.js +2 -0
- package/base16/index.d.ts +1 -0
- package/base16/index.js +1 -0
- package/be/index.d.ts +5 -0
- package/be/index.js +5 -0
- package/be/index.test.ts +251 -0
- package/btoa/index.d.ts +2 -0
- package/btoa/index.js +2 -0
- package/buffer/index.d.ts +2 -0
- package/buffer/index.js +2 -0
- package/chain/index.d.ts +1 -0
- package/chain/index.js +1 -0
- package/class/index.d.ts +1 -0
- package/class/index.js +1 -0
- package/color/index.d.ts +5 -0
- package/color/index.js +5 -0
- package/combinators/index.d.ts +1 -0
- package/combinators/index.js +1 -0
- package/crypto/index.d.ts +7 -0
- package/crypto/index.js +7 -0
- package/currency/index.d.ts +6 -0
- package/currency/index.js +6 -0
- package/data/index.d.ts +2 -0
- package/data/index.js +2 -0
- package/date/index.d.ts +26 -0
- package/date/index.js +26 -0
- package/debounce/index.d.ts +1 -0
- package/debounce/index.js +1 -0
- package/error/index.d.ts +12 -0
- package/error/index.js +12 -0
- package/fetch/index.d.ts +11 -0
- package/fetch/index.js +11 -0
- package/fibonacci/index.d.ts +1 -0
- package/fibonacci/index.js +1 -0
- package/function/index.d.ts +98 -0
- package/function/index.js +98 -0
- package/functional/index.d.ts +3 -0
- package/functional/index.js +3 -0
- package/index.d.ts +1 -0
- package/math/index.d.ts +19 -0
- package/math/index.js +19 -0
- package/matrix/index.d.ts +7 -0
- package/matrix/index.js +7 -0
- package/number/index.d.ts +24 -0
- package/number/index.js +24 -0
- package/object/index.d.ts +51 -0
- package/object/index.js +50 -0
- package/package.json +123 -19
- package/queue/index.d.ts +3 -0
- package/queue/index.js +3 -0
- package/random/index.d.ts +8 -0
- package/random/index.js +8 -0
- package/regex/index.d.ts +3 -0
- package/regex/index.js +3 -0
- package/set/index.d.ts +4 -0
- package/set/index.js +4 -0
- package/sleep/index.d.ts +1 -0
- package/sleep/index.js +1 -0
- package/string/index.d.ts +14 -0
- package/string/index.js +14 -0
- package/time/index.d.ts +13 -0
- package/time/index.js +13 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +1 -0
- package/uri/index.d.ts +12 -0
- package/uri/index.js +12 -0
- package/uuid/index.d.ts +1 -0
- package/uuid/index.js +1 -0
- package/Readme.md +0 -116
package/package.json
CHANGED
|
@@ -1,20 +1,124 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
2
|
+
"name": "ctx-core",
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "ctx-core core library",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ctx-core",
|
|
7
|
+
"array",
|
|
8
|
+
"combinators",
|
|
9
|
+
"function",
|
|
10
|
+
"object",
|
|
11
|
+
"set"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/ctx-core/ctx-core#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ctx-core/ctx-core/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/ctx-core/ctx-core.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
|
+
"author": "Brian Takita",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"files": [
|
|
25
|
+
"*.d.ts",
|
|
26
|
+
"array",
|
|
27
|
+
"atob",
|
|
28
|
+
"base16",
|
|
29
|
+
"be",
|
|
30
|
+
"btoa",
|
|
31
|
+
"buffer",
|
|
32
|
+
"chain",
|
|
33
|
+
"class",
|
|
34
|
+
"color",
|
|
35
|
+
"combinators",
|
|
36
|
+
"crypto",
|
|
37
|
+
"currency",
|
|
38
|
+
"data",
|
|
39
|
+
"date",
|
|
40
|
+
"debounce",
|
|
41
|
+
"error",
|
|
42
|
+
"fetch",
|
|
43
|
+
"fibonacci",
|
|
44
|
+
"function",
|
|
45
|
+
"functional",
|
|
46
|
+
"math",
|
|
47
|
+
"matrix",
|
|
48
|
+
"number",
|
|
49
|
+
"object",
|
|
50
|
+
"queue",
|
|
51
|
+
"random",
|
|
52
|
+
"regex",
|
|
53
|
+
"set",
|
|
54
|
+
"sleep",
|
|
55
|
+
"string",
|
|
56
|
+
"time",
|
|
57
|
+
"types",
|
|
58
|
+
"uri",
|
|
59
|
+
"uuid",
|
|
60
|
+
"package.json"
|
|
61
|
+
],
|
|
62
|
+
"types": "./src/index.d.ts",
|
|
63
|
+
"exports": {
|
|
64
|
+
".": "./index.js",
|
|
65
|
+
"./array": "./array/index.js",
|
|
66
|
+
"./atob": "./atob/index.js",
|
|
67
|
+
"./base16": "./base16/index.js",
|
|
68
|
+
"./btoa": "./btoa/index.js",
|
|
69
|
+
"./buffer": "./buffer/index.js",
|
|
70
|
+
"./chain": "./chain/index.js",
|
|
71
|
+
"./class": "./class/index.js",
|
|
72
|
+
"./color": "./color/index.js",
|
|
73
|
+
"./combinators": "./combinators/index.js",
|
|
74
|
+
"./crypto": "./crypto/index.js",
|
|
75
|
+
"./currency": "./currency/index.js",
|
|
76
|
+
"./data": "./data/index.js",
|
|
77
|
+
"./date": "./date/index.js",
|
|
78
|
+
"./debounce": "./debounce/index.js",
|
|
79
|
+
"./error": "./error/index.js",
|
|
80
|
+
"./fetch": "./fetch/index.js",
|
|
81
|
+
"./fibonacci": "./fibonacci/index.js",
|
|
82
|
+
"./function": "./function/index.js",
|
|
83
|
+
"./functional": "./functional/index.js",
|
|
84
|
+
"./math": "./math/index.js",
|
|
85
|
+
"./matrix": "./matrix/index.js",
|
|
86
|
+
"./number": "./number/index.js",
|
|
87
|
+
"./object": "./object/index.js",
|
|
88
|
+
"./queue": "./queue/index.js",
|
|
89
|
+
"./random": "./random/index.js",
|
|
90
|
+
"./regex": "./regex/index.js",
|
|
91
|
+
"./set": "./set/index.js",
|
|
92
|
+
"./sleep": "./sleep/index.js",
|
|
93
|
+
"./string": "./string/index.js",
|
|
94
|
+
"./time": "./time/index.js",
|
|
95
|
+
"./types": "./types/index.js",
|
|
96
|
+
"./uri": "./uri/index.js",
|
|
97
|
+
"./uuid": "./uuid/index.js",
|
|
98
|
+
"./package.json": "./package.json"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@arethetypeswrong/cli": "^0.13.1",
|
|
102
|
+
"@types/sinon": "^17.0.1",
|
|
103
|
+
"c8": "^8.0.1",
|
|
104
|
+
"check-dts": "^0.7.2",
|
|
105
|
+
"sinon": "^17.0.1",
|
|
106
|
+
"ts-node": "^10.9.1",
|
|
107
|
+
"tsx": "^4.1.2",
|
|
108
|
+
"typescript": "next",
|
|
109
|
+
"uvu": "^0.5.6"
|
|
110
|
+
},
|
|
111
|
+
"publishConfig": {
|
|
112
|
+
"access": "public",
|
|
113
|
+
"cache": "~/.npm"
|
|
114
|
+
},
|
|
115
|
+
"sideEffects": false,
|
|
116
|
+
"scripts": {
|
|
117
|
+
"build": ":",
|
|
118
|
+
"clean": ":",
|
|
119
|
+
"exec": "$@",
|
|
120
|
+
"test": "pnpm test-unit && check-dts",
|
|
121
|
+
"test-unit": "tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
|
|
122
|
+
"test-unit-coverage": "c8 pnpm test-unit"
|
|
123
|
+
}
|
|
124
|
+
}
|
package/queue/index.d.ts
ADDED
package/queue/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from '../all/distribution_random_float/index.js'
|
|
2
|
+
export * from '../all/distribution_random_int/index.js'
|
|
3
|
+
export * from '../all/normal_random/index.js'
|
|
4
|
+
export * from '../all/normal_random_float/index.js'
|
|
5
|
+
export * from '../all/normal_random_int/index.js'
|
|
6
|
+
export * from '../all/uniform_random/index.js'
|
|
7
|
+
export * from '../all/uniform_random_float/index.js'
|
|
8
|
+
export * from '../all/uniform_random_int/index.js'
|
package/random/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from '../all/distribution_random_float/index.js'
|
|
2
|
+
export * from '../all/distribution_random_int/index.js'
|
|
3
|
+
export * from '../all/normal_random/index.js'
|
|
4
|
+
export * from '../all/normal_random_float/index.js'
|
|
5
|
+
export * from '../all/normal_random_int/index.js'
|
|
6
|
+
export * from '../all/uniform_random/index.js'
|
|
7
|
+
export * from '../all/uniform_random_float/index.js'
|
|
8
|
+
export * from '../all/uniform_random_int/index.js'
|
package/regex/index.d.ts
ADDED
package/regex/index.js
ADDED
package/set/index.d.ts
ADDED
package/set/index.js
ADDED
package/sleep/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../all/sleep/index.js'
|
package/sleep/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../all/sleep/index.js'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from '../all/acronym/index.js'
|
|
2
|
+
export * from '../all/case_insensitive_eql/index.js'
|
|
3
|
+
export * from '../all/indendation/index.js'
|
|
4
|
+
export * from '../all/isLowerCase/index.js'
|
|
5
|
+
export * from '../all/isString/index.js'
|
|
6
|
+
export * from '../all/isUpperCase/index.js'
|
|
7
|
+
export * from '../all/lPad/index.js'
|
|
8
|
+
export * from '../all/line__parse/index.js'
|
|
9
|
+
export * from '../all/line__transform_stream/index.js'
|
|
10
|
+
export * from '../all/rPad/index.js'
|
|
11
|
+
export * from '../all/readable_stream_OR_reader/index.js'
|
|
12
|
+
export * from '../all/splice_str/index.js'
|
|
13
|
+
export * from '../all/table_txt/index.js'
|
|
14
|
+
export * from '../all/title_case_/index.js'
|
package/string/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from '../all/acronym/index.js'
|
|
2
|
+
export * from '../all/case_insensitive_eql/index.js'
|
|
3
|
+
export * from '../all/indendation/index.js'
|
|
4
|
+
export * from '../all/isLowerCase/index.js'
|
|
5
|
+
export * from '../all/isString/index.js'
|
|
6
|
+
export * from '../all/isUpperCase/index.js'
|
|
7
|
+
export * from '../all/line__parse/index.js'
|
|
8
|
+
export * from '../all/line__transform_stream/index.js'
|
|
9
|
+
export * from '../all/lPad/index.js'
|
|
10
|
+
export * from '../all/readable_stream_OR_reader/index.js'
|
|
11
|
+
export * from '../all/rPad/index.js'
|
|
12
|
+
export * from '../all/splice_str/index.js'
|
|
13
|
+
export * from '../all/table_txt/index.js'
|
|
14
|
+
export * from '../all/title_case_/index.js'
|
package/time/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from '../all/day/index.js'
|
|
2
|
+
export * from '../all/day_seconds/index.js'
|
|
3
|
+
export * from '../all/hour/index.js'
|
|
4
|
+
export * from '../all/hour_seconds/index.js'
|
|
5
|
+
export * from '../all/minute/index.js'
|
|
6
|
+
export * from '../all/minute_seconds/index.js'
|
|
7
|
+
export * from '../all/month_ms/index.js'
|
|
8
|
+
export * from '../all/month_seconds/index.js'
|
|
9
|
+
export * from '../all/since_time_text/index.js'
|
|
10
|
+
export * from '../all/timedout/index.js'
|
|
11
|
+
export * from '../all/timestamp_ms/index.js'
|
|
12
|
+
export * from '../all/year_ms/index.js'
|
|
13
|
+
export * from '../all/year_seconds/index.js'
|
package/time/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from '../all/day/index.js'
|
|
2
|
+
export * from '../all/day_seconds/index.js'
|
|
3
|
+
export * from '../all/hour/index.js'
|
|
4
|
+
export * from '../all/hour_seconds/index.js'
|
|
5
|
+
export * from '../all/minute/index.js'
|
|
6
|
+
export * from '../all/minute_seconds/index.js'
|
|
7
|
+
export * from '../all/month_ms/index.js'
|
|
8
|
+
export * from '../all/month_seconds/index.js'
|
|
9
|
+
export * from '../all/since_time_text/index.js'
|
|
10
|
+
export * from '../all/timedout/index.js'
|
|
11
|
+
export * from '../all/timestamp_ms/index.js'
|
|
12
|
+
export * from '../all/year_ms/index.js'
|
|
13
|
+
export * from '../all/year_seconds/index.js'
|
package/types/index.d.ts
ADDED
package/types/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/uri/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../all/url_segment/index.js'
|
|
2
|
+
export * from '../all/hostname/index.js'
|
|
3
|
+
export * from '../all/not_nullish__query_str/index.js'
|
|
4
|
+
export * from '../all/pathname/index.js'
|
|
5
|
+
export * from '../all/query_str/index.js'
|
|
6
|
+
export * from '../all/query_str__searchParams/index.js'
|
|
7
|
+
export * from '../all/query_str__searchParams_o/index.js'
|
|
8
|
+
export * from '../all/searchParams_o/index.js'
|
|
9
|
+
export * from '../all/url_basename/index.js'
|
|
10
|
+
export * from '../all/url_segment/index.js'
|
|
11
|
+
export * from '../all/urn_url/index.js'
|
|
12
|
+
export * from '../all/url__join/index.js'
|
package/uri/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../all/url_segment/index.js'
|
|
2
|
+
export * from '../all/hostname/index.js'
|
|
3
|
+
export * from '../all/not_nullish__query_str/index.js'
|
|
4
|
+
export * from '../all/pathname/index.js'
|
|
5
|
+
export * from '../all/query_str/index.js'
|
|
6
|
+
export * from '../all/query_str__searchParams/index.js'
|
|
7
|
+
export * from '../all/query_str__searchParams_o/index.js'
|
|
8
|
+
export * from '../all/searchParams_o/index.js'
|
|
9
|
+
export * from '../all/url_basename/index.js'
|
|
10
|
+
export * from '../all/url_segment/index.js'
|
|
11
|
+
export * from '../all/urn_url/index.js'
|
|
12
|
+
export * from '../all/url__join/index.js'
|
package/uuid/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../all/uuid/index.js'
|
package/uuid/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../all/uuid/index.js'
|
package/Readme.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
ctx-core
|
|
2
|
-
|
|
3
|
-
A composable monorepo web-service/front-end toolkit that emphasizes:
|
|
4
|
-
|
|
5
|
-
* starter apps & quick prototyping with a scalable architecture
|
|
6
|
-
* {up,down}-scalable complexity
|
|
7
|
-
* functional-dominant hybrid style of programming
|
|
8
|
-
* data flow
|
|
9
|
-
* simple & composable interfaces
|
|
10
|
-
* reuse across projects
|
|
11
|
-
* anti-fragile development
|
|
12
|
-
|
|
13
|
-
# Install
|
|
14
|
-
|
|
15
|
-
curl -o- https://raw.githubusercontent.com/ctx-core/ctx-core/master/bin/install-ctx-core.sh | bash
|
|
16
|
-
|
|
17
|
-
# Usage
|
|
18
|
-
|
|
19
|
-
1. Fork ctx-core & add your ctx-core fork as a git submodule.
|
|
20
|
-
1. Create a `.gitignore` file in your project with
|
|
21
|
-
```
|
|
22
|
-
/.env
|
|
23
|
-
```
|
|
24
|
-
1. Create a .env file (see the .env.sample.* files in the ctx-core directory)
|
|
25
|
-
|
|
26
|
-
Please send pull requests.
|
|
27
|
-
|
|
28
|
-
# Technologies
|
|
29
|
-
|
|
30
|
-
* [es6](https://github.com/lukehoban/es6features)
|
|
31
|
-
* [riotjs](http://riotjs.com/)
|
|
32
|
-
|
|
33
|
-
# Techniques
|
|
34
|
-
|
|
35
|
-
* [agents](http://c2.com/cgi/wiki?ActorVsAgent)
|
|
36
|
-
* [rpc](https://www.wikiwand.com/en/Remote_procedure_call)
|
|
37
|
-
|
|
38
|
-
# Explicit Domain Driven Design
|
|
39
|
-
|
|
40
|
-
"The Map is not the territory"
|
|
41
|
-
|
|
42
|
-
<em>—Alfred Korzybski</em>
|
|
43
|
-
|
|
44
|
-
"All non-trivial abstractions, to some degree, are leaky"
|
|
45
|
-
|
|
46
|
-
<em>—Joel Spolsky</em>
|
|
47
|
-
|
|
48
|
-
I view software as a creative model of Existence. Software, in emulating other entities in Existence, also exists as entities.
|
|
49
|
-
|
|
50
|
-
Language, using a schema, provides a system of abstraction enabling one to model something.
|
|
51
|
-
Language is context sensitive & composable. With the Language tool, we craft systems of illusion, intelligence, & life.
|
|
52
|
-
|
|
53
|
-
## Naming Conventions
|
|
54
|
-
|
|
55
|
-
Source Code is a UX to interface with the raw machine.
|
|
56
|
-
|
|
57
|
-
The affordances provided by programming languages allows one to:
|
|
58
|
-
|
|
59
|
-
* name abstractions
|
|
60
|
-
* create patterns & metaphor
|
|
61
|
-
* express one's model of Existence
|
|
62
|
-
* create a tool to perform work
|
|
63
|
-
|
|
64
|
-
# Optionality — Degrees of Freedom over Forecasting
|
|
65
|
-
|
|
66
|
-
I prefer to have optionality over compound planing (assumptions, based on assumptions, …).
|
|
67
|
-
We live in a complex & interconnected existence; with the potential for a diverse set of outcomes.
|
|
68
|
-
Complexity, interconnectivity, novelty, & creation is beyond any single entity's ability to effectively forecast.
|
|
69
|
-
|
|
70
|
-
Language evolves as our conscious understanding evolves…& vice versa.
|
|
71
|
-
Ambiguity is a tool of consciousness to compel us to explore the dissonance in our current model of Existence.
|
|
72
|
-
Follow the rabbit hole…and a richer Existence awaits.
|
|
73
|
-
|
|
74
|
-
# Monorepo
|
|
75
|
-
|
|
76
|
-
I chose to use a monorepo:
|
|
77
|
-
|
|
78
|
-
* to reduce development friction in managing my various projects
|
|
79
|
-
* to utilize patterns across my projects
|
|
80
|
-
|
|
81
|
-
Monorepos are, once again, gaining favor as a way to efficiently manage disparate projects.
|
|
82
|
-
I choose to use monorepos across my projects to create value & optionality for my clients and to model abstract patterns to continuously improve the products.
|
|
83
|
-
|
|
84
|
-
# Demos
|
|
85
|
-
|
|
86
|
-
I work for clients that often utilize proprietary data sources. Currently, ctx-core has a starter app that is a quovo portfolio viewer.
|
|
87
|
-
I am working on creating more starter apps & getting a demo account with quovo.
|
|
88
|
-
|
|
89
|
-
In the mean time, I can do private demos (with additional examples that I can't show in public) on Google Hangout. Please contact me at: <a href="mailto:brian.takita+ctx-core@gmail.com?subject=ctx-core">brian.takita@gmail.com</a>
|
|
90
|
-
|
|
91
|
-
# Acknowledgements & Gratitude
|
|
92
|
-
|
|
93
|
-
Thank you to all of you adventurous spirits who push the edge, cross boundaries, & create convergence to enrich our collective Existence.
|
|
94
|
-
|
|
95
|
-
Thank you to those who have failed many times, yet never gave up in following your bliss.
|
|
96
|
-
|
|
97
|
-
Thank you to everybody whom I have had a pleasure to work with & who has graced my life.
|
|
98
|
-
I have learned much from your perspectives & hope to continue to be blessed by your physical presence & your presence in my heart.
|
|
99
|
-
|
|
100
|
-
Thank you to all beautiful souls who grace us with this immersive & thoroughly interesting world.
|
|
101
|
-
|
|
102
|
-
## The Censible Team
|
|
103
|
-
|
|
104
|
-
Thank you to the [Censible](http://censible.co) team for the inspiration, willingness, & for being the initial sponsor for ctx-root.
|
|
105
|
-
|
|
106
|
-
A special thank to to:
|
|
107
|
-
[@pmart123](https://github.com/pmart123),
|
|
108
|
-
[@snuggs](https://github.com/snuggs),
|
|
109
|
-
[@cristhiandick](https://github.com/cristhiandick),
|
|
110
|
-
[@albertopontonio](https://github.com/albertopontonio),
|
|
111
|
-
[@strictlymomo](https://github.com/strictlymomo),
|
|
112
|
-
[@mrbernnz](https://github.com/mrbernnz),
|
|
113
|
-
[@katezaps](https://github.com/katezaps),
|
|
114
|
-
[@tmornini](https://github.com/tmornini),
|
|
115
|
-
[@ebransom](https://github.com/ebransom)
|
|
116
|
-
for your collaboration, brilliance, attitude, & friendship.
|