@almadar/std 1.0.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.
Files changed (78) hide show
  1. package/LICENSE +72 -0
  2. package/dist/behaviors/action-affinity.d.ts +88 -0
  3. package/dist/behaviors/action-affinity.js +290 -0
  4. package/dist/behaviors/action-affinity.js.map +1 -0
  5. package/dist/behaviors/async.d.ts +20 -0
  6. package/dist/behaviors/async.js +542 -0
  7. package/dist/behaviors/async.js.map +1 -0
  8. package/dist/behaviors/data-management.d.ts +40 -0
  9. package/dist/behaviors/data-management.js +495 -0
  10. package/dist/behaviors/data-management.js.map +1 -0
  11. package/dist/behaviors/feedback.d.ts +18 -0
  12. package/dist/behaviors/feedback.js +307 -0
  13. package/dist/behaviors/feedback.js.map +1 -0
  14. package/dist/behaviors/game-core.d.ts +40 -0
  15. package/dist/behaviors/game-core.js +443 -0
  16. package/dist/behaviors/game-core.js.map +1 -0
  17. package/dist/behaviors/game-entity.d.ts +39 -0
  18. package/dist/behaviors/game-entity.js +643 -0
  19. package/dist/behaviors/game-entity.js.map +1 -0
  20. package/dist/behaviors/game-ui.d.ts +29 -0
  21. package/dist/behaviors/game-ui.js +493 -0
  22. package/dist/behaviors/game-ui.js.map +1 -0
  23. package/dist/behaviors/index.d.ts +11 -0
  24. package/dist/behaviors/index.js +4539 -0
  25. package/dist/behaviors/index.js.map +1 -0
  26. package/dist/behaviors/registry.d.ts +103 -0
  27. package/dist/behaviors/registry.js +4166 -0
  28. package/dist/behaviors/registry.js.map +1 -0
  29. package/dist/behaviors/types.d.ts +179 -0
  30. package/dist/behaviors/types.js +111 -0
  31. package/dist/behaviors/types.js.map +1 -0
  32. package/dist/behaviors/ui-interaction.d.ts +36 -0
  33. package/dist/behaviors/ui-interaction.js +1104 -0
  34. package/dist/behaviors/ui-interaction.js.map +1 -0
  35. package/dist/index.d.ts +195 -0
  36. package/dist/index.js +8209 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/modules/array.d.ts +28 -0
  39. package/dist/modules/array.js +556 -0
  40. package/dist/modules/array.js.map +1 -0
  41. package/dist/modules/async.d.ts +22 -0
  42. package/dist/modules/async.js +112 -0
  43. package/dist/modules/async.js.map +1 -0
  44. package/dist/modules/format.d.ts +21 -0
  45. package/dist/modules/format.js +129 -0
  46. package/dist/modules/format.js.map +1 -0
  47. package/dist/modules/index.d.ts +12 -0
  48. package/dist/modules/index.js +3131 -0
  49. package/dist/modules/index.js.map +1 -0
  50. package/dist/modules/math.d.ts +22 -0
  51. package/dist/modules/math.js +215 -0
  52. package/dist/modules/math.js.map +1 -0
  53. package/dist/modules/nn.d.ts +23 -0
  54. package/dist/modules/nn.js +189 -0
  55. package/dist/modules/nn.js.map +1 -0
  56. package/dist/modules/object.d.ts +22 -0
  57. package/dist/modules/object.js +257 -0
  58. package/dist/modules/object.js.map +1 -0
  59. package/dist/modules/str.d.ts +21 -0
  60. package/dist/modules/str.js +344 -0
  61. package/dist/modules/str.js.map +1 -0
  62. package/dist/modules/tensor.d.ts +23 -0
  63. package/dist/modules/tensor.js +427 -0
  64. package/dist/modules/tensor.js.map +1 -0
  65. package/dist/modules/time.d.ts +24 -0
  66. package/dist/modules/time.js +323 -0
  67. package/dist/modules/time.js.map +1 -0
  68. package/dist/modules/train.d.ts +23 -0
  69. package/dist/modules/train.js +308 -0
  70. package/dist/modules/train.js.map +1 -0
  71. package/dist/modules/validate.d.ts +23 -0
  72. package/dist/modules/validate.js +301 -0
  73. package/dist/modules/validate.js.map +1 -0
  74. package/dist/registry.d.ts +140 -0
  75. package/dist/registry.js +3240 -0
  76. package/dist/registry.js.map +1 -0
  77. package/dist/types-I95R8_FN.d.ts +91 -0
  78. package/package.json +59 -0
@@ -0,0 +1,257 @@
1
+ // modules/object.ts
2
+ var OBJECT_OPERATORS = {
3
+ "object/keys": {
4
+ module: "object",
5
+ category: "std-object",
6
+ minArity: 1,
7
+ maxArity: 1,
8
+ description: "Get object keys as array",
9
+ hasSideEffects: false,
10
+ returnType: "array",
11
+ params: [{ name: "obj", type: "object", description: "The object" }],
12
+ example: '["object/keys", {"a": 1, "b": 2}] // => ["a", "b"]'
13
+ },
14
+ "object/values": {
15
+ module: "object",
16
+ category: "std-object",
17
+ minArity: 1,
18
+ maxArity: 1,
19
+ description: "Get object values as array",
20
+ hasSideEffects: false,
21
+ returnType: "array",
22
+ params: [{ name: "obj", type: "object", description: "The object" }],
23
+ example: '["object/values", {"a": 1, "b": 2}] // => [1, 2]'
24
+ },
25
+ "object/entries": {
26
+ module: "object",
27
+ category: "std-object",
28
+ minArity: 1,
29
+ maxArity: 1,
30
+ description: "Get [key, value] pairs as array",
31
+ hasSideEffects: false,
32
+ returnType: "array",
33
+ params: [{ name: "obj", type: "object", description: "The object" }],
34
+ example: '["object/entries", {"a": 1}] // => [["a", 1]]'
35
+ },
36
+ "object/fromEntries": {
37
+ module: "object",
38
+ category: "std-object",
39
+ minArity: 1,
40
+ maxArity: 1,
41
+ description: "Create object from [key, value] pairs",
42
+ hasSideEffects: false,
43
+ returnType: "any",
44
+ params: [{ name: "entries", type: "array", description: "Array of [key, value] pairs" }],
45
+ example: '["object/fromEntries", [["a", 1], ["b", 2]]] // => {"a": 1, "b": 2}'
46
+ },
47
+ "object/get": {
48
+ module: "object",
49
+ category: "std-object",
50
+ minArity: 2,
51
+ maxArity: 3,
52
+ description: "Get nested value by path",
53
+ hasSideEffects: false,
54
+ returnType: "any",
55
+ params: [
56
+ { name: "obj", type: "object", description: "The object" },
57
+ { name: "path", type: "string", description: 'Dot-separated path (e.g., "user.name")' },
58
+ { name: "default", type: "any", description: "Default if path not found", optional: true }
59
+ ],
60
+ example: '["object/get", "@user", "profile.name", "Anonymous"]'
61
+ },
62
+ "object/set": {
63
+ module: "object",
64
+ category: "std-object",
65
+ minArity: 3,
66
+ maxArity: 3,
67
+ description: "Set nested value by path (returns new object)",
68
+ hasSideEffects: false,
69
+ returnType: "any",
70
+ params: [
71
+ { name: "obj", type: "object", description: "The object" },
72
+ { name: "path", type: "string", description: "Dot-separated path" },
73
+ { name: "value", type: "any", description: "Value to set" }
74
+ ],
75
+ example: '["object/set", "@user", "profile.name", "John"]'
76
+ },
77
+ "object/has": {
78
+ module: "object",
79
+ category: "std-object",
80
+ minArity: 2,
81
+ maxArity: 2,
82
+ description: "Check if path exists",
83
+ hasSideEffects: false,
84
+ returnType: "boolean",
85
+ params: [
86
+ { name: "obj", type: "object", description: "The object" },
87
+ { name: "path", type: "string", description: "Dot-separated path" }
88
+ ],
89
+ example: '["object/has", "@user", "profile.name"]'
90
+ },
91
+ "object/merge": {
92
+ module: "object",
93
+ category: "std-object",
94
+ minArity: 2,
95
+ maxArity: null,
96
+ description: "Shallow merge objects (later wins)",
97
+ hasSideEffects: false,
98
+ returnType: "any",
99
+ params: [{ name: "...objs", type: "object[]", description: "Objects to merge" }],
100
+ example: '["object/merge", {"a": 1}, {"b": 2}] // => {"a": 1, "b": 2}'
101
+ },
102
+ "object/deepMerge": {
103
+ module: "object",
104
+ category: "std-object",
105
+ minArity: 2,
106
+ maxArity: null,
107
+ description: "Deep merge objects (later wins)",
108
+ hasSideEffects: false,
109
+ returnType: "any",
110
+ params: [{ name: "...objs", type: "object[]", description: "Objects to merge" }],
111
+ example: '["object/deepMerge", {"a": {"b": 1}}, {"a": {"c": 2}}]'
112
+ },
113
+ "object/pick": {
114
+ module: "object",
115
+ category: "std-object",
116
+ minArity: 2,
117
+ maxArity: 2,
118
+ description: "Select only specified keys",
119
+ hasSideEffects: false,
120
+ returnType: "any",
121
+ params: [
122
+ { name: "obj", type: "object", description: "The object" },
123
+ { name: "keys", type: "array", description: "Keys to keep" }
124
+ ],
125
+ example: '["object/pick", "@entity", ["name", "email"]]'
126
+ },
127
+ "object/omit": {
128
+ module: "object",
129
+ category: "std-object",
130
+ minArity: 2,
131
+ maxArity: 2,
132
+ description: "Exclude specified keys",
133
+ hasSideEffects: false,
134
+ returnType: "any",
135
+ params: [
136
+ { name: "obj", type: "object", description: "The object" },
137
+ { name: "keys", type: "array", description: "Keys to exclude" }
138
+ ],
139
+ example: '["object/omit", "@entity", ["password", "secret"]]'
140
+ },
141
+ "object/mapValues": {
142
+ module: "object",
143
+ category: "std-object",
144
+ minArity: 2,
145
+ maxArity: 2,
146
+ description: "Transform all values",
147
+ hasSideEffects: false,
148
+ returnType: "any",
149
+ acceptsLambda: true,
150
+ lambdaArgPosition: 1,
151
+ params: [
152
+ { name: "obj", type: "object", description: "The object" },
153
+ { name: "fn", type: "lambda", description: "Transform function" }
154
+ ],
155
+ example: '["object/mapValues", "@stats", ["fn", "v", ["*", "@v", 100]]]'
156
+ },
157
+ "object/mapKeys": {
158
+ module: "object",
159
+ category: "std-object",
160
+ minArity: 2,
161
+ maxArity: 2,
162
+ description: "Transform all keys",
163
+ hasSideEffects: false,
164
+ returnType: "any",
165
+ acceptsLambda: true,
166
+ lambdaArgPosition: 1,
167
+ params: [
168
+ { name: "obj", type: "object", description: "The object" },
169
+ { name: "fn", type: "lambda", description: "Transform function" }
170
+ ],
171
+ example: '["object/mapKeys", "@data", ["fn", "k", ["str/upper", "@k"]]]'
172
+ },
173
+ "object/filter": {
174
+ module: "object",
175
+ category: "std-object",
176
+ minArity: 2,
177
+ maxArity: 2,
178
+ description: "Filter entries by predicate",
179
+ hasSideEffects: false,
180
+ returnType: "any",
181
+ acceptsLambda: true,
182
+ lambdaArgPosition: 1,
183
+ params: [
184
+ { name: "obj", type: "object", description: "The object" },
185
+ { name: "pred", type: "lambda", description: "Predicate (key, value) => boolean" }
186
+ ],
187
+ example: '["object/filter", "@data", ["fn", ["k", "v"], ["!=", "@v", null]]]'
188
+ },
189
+ "object/empty?": {
190
+ module: "object",
191
+ category: "std-object",
192
+ minArity: 1,
193
+ maxArity: 1,
194
+ description: "Check if object has no keys",
195
+ hasSideEffects: false,
196
+ returnType: "boolean",
197
+ params: [{ name: "obj", type: "object", description: "The object" }],
198
+ example: '["object/empty?", {}] // => true'
199
+ },
200
+ "object/equals": {
201
+ module: "object",
202
+ category: "std-object",
203
+ minArity: 2,
204
+ maxArity: 2,
205
+ description: "Deep equality check",
206
+ hasSideEffects: false,
207
+ returnType: "boolean",
208
+ params: [
209
+ { name: "a", type: "object", description: "First object" },
210
+ { name: "b", type: "object", description: "Second object" }
211
+ ],
212
+ example: '["object/equals", {"a": 1}, {"a": 1}] // => true'
213
+ },
214
+ "object/clone": {
215
+ module: "object",
216
+ category: "std-object",
217
+ minArity: 1,
218
+ maxArity: 1,
219
+ description: "Shallow clone object",
220
+ hasSideEffects: false,
221
+ returnType: "any",
222
+ params: [{ name: "obj", type: "object", description: "The object" }],
223
+ example: '["object/clone", "@entity"]'
224
+ },
225
+ "object/deepClone": {
226
+ module: "object",
227
+ category: "std-object",
228
+ minArity: 1,
229
+ maxArity: 1,
230
+ description: "Deep clone object",
231
+ hasSideEffects: false,
232
+ returnType: "any",
233
+ params: [{ name: "obj", type: "object", description: "The object" }],
234
+ example: '["object/deepClone", "@entity"]'
235
+ },
236
+ "path": {
237
+ module: "object",
238
+ category: "std-object",
239
+ minArity: 1,
240
+ maxArity: null,
241
+ // variadic
242
+ description: "Build a dot-separated path string from segments. Used with set effect for dynamic field paths.",
243
+ hasSideEffects: false,
244
+ returnType: "string",
245
+ params: [
246
+ { name: "...segments", type: "string[]", description: "Path segments to join with dots" }
247
+ ],
248
+ example: '["path", "formValues", "@payload.fieldId"] // => "formValues.customerName"'
249
+ }
250
+ };
251
+ function getObjectOperators() {
252
+ return Object.keys(OBJECT_OPERATORS);
253
+ }
254
+
255
+ export { OBJECT_OPERATORS, getObjectOperators };
256
+ //# sourceMappingURL=object.js.map
257
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../modules/object.ts"],"names":[],"mappings":";AAeO,IAAM,gBAAA,GAAoD;AAAA,EAC/D,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,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,QAAA,EAAU,WAAA,EAAa,YAAA,EAAc,CAAA;AAAA,IACnE,OAAA,EAAS;AAAA,GACX;AAAA,EACA,kBAAA,EAAoB;AAAA,IAClB,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,mBAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,KAAA;AAAA,IACZ,MAAA,EAAQ,CAAC,EAAE,IAAA,EAAM,OAAO,IAAA,EAAM,QAAA,EAAU,WAAA,EAAa,YAAA,EAAc,CAAA;AAAA,IACnE,OAAA,EAAS;AAAA,GACX;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU,YAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,IAAA;AAAA;AAAA,IACV,WAAA,EAAa,gGAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,QAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,UAAA,EAAY,aAAa,iCAAA;AAAkC,KAC1F;AAAA,IACA,OAAA,EAAS;AAAA;AAEb;AAKO,SAAS,kBAAA,GAA+B;AAC7C,EAAA,OAAO,MAAA,CAAO,KAAK,gBAAgB,CAAA;AACrC","file":"object.js","sourcesContent":["/**\n * Object Module - Object Operations\n *\n * Provides object manipulation and transformation functions.\n * All operations are immutable (return new objects).\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\n/**\n * Object module operators.\n * All operators return objects or other values and have no side effects.\n */\nexport const OBJECT_OPERATORS: Record<string, StdOperatorMeta> = {\n 'object/keys': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Get object keys as array',\n hasSideEffects: false,\n returnType: 'array',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/keys\", {\"a\": 1, \"b\": 2}] // => [\"a\", \"b\"]',\n },\n 'object/values': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Get object values as array',\n hasSideEffects: false,\n returnType: 'array',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/values\", {\"a\": 1, \"b\": 2}] // => [1, 2]',\n },\n 'object/entries': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Get [key, value] pairs as array',\n hasSideEffects: false,\n returnType: 'array',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/entries\", {\"a\": 1}] // => [[\"a\", 1]]',\n },\n 'object/fromEntries': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Create object from [key, value] pairs',\n hasSideEffects: false,\n returnType: 'any',\n params: [{ name: 'entries', type: 'array', description: 'Array of [key, value] pairs' }],\n example: '[\"object/fromEntries\", [[\"a\", 1], [\"b\", 2]]] // => {\"a\": 1, \"b\": 2}',\n },\n 'object/get': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 3,\n description: 'Get nested value by path',\n hasSideEffects: false,\n returnType: 'any',\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'path', type: 'string', description: 'Dot-separated path (e.g., \"user.name\")' },\n { name: 'default', type: 'any', description: 'Default if path not found', optional: true },\n ],\n example: '[\"object/get\", \"@user\", \"profile.name\", \"Anonymous\"]',\n },\n 'object/set': {\n module: 'object',\n category: 'std-object',\n minArity: 3,\n maxArity: 3,\n description: 'Set nested value by path (returns new object)',\n hasSideEffects: false,\n returnType: 'any',\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'path', type: 'string', description: 'Dot-separated path' },\n { name: 'value', type: 'any', description: 'Value to set' },\n ],\n example: '[\"object/set\", \"@user\", \"profile.name\", \"John\"]',\n },\n 'object/has': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Check if path exists',\n hasSideEffects: false,\n returnType: 'boolean',\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'path', type: 'string', description: 'Dot-separated path' },\n ],\n example: '[\"object/has\", \"@user\", \"profile.name\"]',\n },\n 'object/merge': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: null,\n description: 'Shallow merge objects (later wins)',\n hasSideEffects: false,\n returnType: 'any',\n params: [{ name: '...objs', type: 'object[]', description: 'Objects to merge' }],\n example: '[\"object/merge\", {\"a\": 1}, {\"b\": 2}] // => {\"a\": 1, \"b\": 2}',\n },\n 'object/deepMerge': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: null,\n description: 'Deep merge objects (later wins)',\n hasSideEffects: false,\n returnType: 'any',\n params: [{ name: '...objs', type: 'object[]', description: 'Objects to merge' }],\n example: '[\"object/deepMerge\", {\"a\": {\"b\": 1}}, {\"a\": {\"c\": 2}}]',\n },\n 'object/pick': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Select only specified keys',\n hasSideEffects: false,\n returnType: 'any',\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'keys', type: 'array', description: 'Keys to keep' },\n ],\n example: '[\"object/pick\", \"@entity\", [\"name\", \"email\"]]',\n },\n 'object/omit': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Exclude specified keys',\n hasSideEffects: false,\n returnType: 'any',\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'keys', type: 'array', description: 'Keys to exclude' },\n ],\n example: '[\"object/omit\", \"@entity\", [\"password\", \"secret\"]]',\n },\n 'object/mapValues': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Transform all values',\n hasSideEffects: false,\n returnType: 'any',\n acceptsLambda: true,\n lambdaArgPosition: 1,\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'fn', type: 'lambda', description: 'Transform function' },\n ],\n example: '[\"object/mapValues\", \"@stats\", [\"fn\", \"v\", [\"*\", \"@v\", 100]]]',\n },\n 'object/mapKeys': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Transform all keys',\n hasSideEffects: false,\n returnType: 'any',\n acceptsLambda: true,\n lambdaArgPosition: 1,\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'fn', type: 'lambda', description: 'Transform function' },\n ],\n example: '[\"object/mapKeys\", \"@data\", [\"fn\", \"k\", [\"str/upper\", \"@k\"]]]',\n },\n 'object/filter': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Filter entries by predicate',\n hasSideEffects: false,\n returnType: 'any',\n acceptsLambda: true,\n lambdaArgPosition: 1,\n params: [\n { name: 'obj', type: 'object', description: 'The object' },\n { name: 'pred', type: 'lambda', description: 'Predicate (key, value) => boolean' },\n ],\n example: '[\"object/filter\", \"@data\", [\"fn\", [\"k\", \"v\"], [\"!=\", \"@v\", null]]]',\n },\n 'object/empty?': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Check if object has no keys',\n hasSideEffects: false,\n returnType: 'boolean',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/empty?\", {}] // => true',\n },\n 'object/equals': {\n module: 'object',\n category: 'std-object',\n minArity: 2,\n maxArity: 2,\n description: 'Deep equality check',\n hasSideEffects: false,\n returnType: 'boolean',\n params: [\n { name: 'a', type: 'object', description: 'First object' },\n { name: 'b', type: 'object', description: 'Second object' },\n ],\n example: '[\"object/equals\", {\"a\": 1}, {\"a\": 1}] // => true',\n },\n 'object/clone': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Shallow clone object',\n hasSideEffects: false,\n returnType: 'any',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/clone\", \"@entity\"]',\n },\n 'object/deepClone': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: 1,\n description: 'Deep clone object',\n hasSideEffects: false,\n returnType: 'any',\n params: [{ name: 'obj', type: 'object', description: 'The object' }],\n example: '[\"object/deepClone\", \"@entity\"]',\n },\n 'path': {\n module: 'object',\n category: 'std-object',\n minArity: 1,\n maxArity: null, // variadic\n description: 'Build a dot-separated path string from segments. Used with set effect for dynamic field paths.',\n hasSideEffects: false,\n returnType: 'string',\n params: [\n { name: '...segments', type: 'string[]', description: 'Path segments to join with dots' },\n ],\n example: '[\"path\", \"formValues\", \"@payload.fieldId\"] // => \"formValues.customerName\"',\n },\n};\n\n/**\n * Get all object operator names.\n */\nexport function getObjectOperators(): string[] {\n return Object.keys(OBJECT_OPERATORS);\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { a as StdOperatorMeta } from '../types-I95R8_FN.js';
2
+
3
+ /**
4
+ * String Module - String Operations
5
+ *
6
+ * Provides string manipulation and transformation functions.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+
11
+ /**
12
+ * String module operators.
13
+ * All operators return strings (or boolean for checks) and have no side effects.
14
+ */
15
+ declare const STR_OPERATORS: Record<string, StdOperatorMeta>;
16
+ /**
17
+ * Get all string operator names.
18
+ */
19
+ declare function getStrOperators(): string[];
20
+
21
+ export { STR_OPERATORS, getStrOperators };
@@ -0,0 +1,344 @@
1
+ // modules/str.ts
2
+ var STR_OPERATORS = {
3
+ "str/len": {
4
+ module: "str",
5
+ category: "std-str",
6
+ minArity: 1,
7
+ maxArity: 1,
8
+ description: "String length",
9
+ hasSideEffects: false,
10
+ returnType: "number",
11
+ params: [{ name: "s", type: "string", description: "The string" }],
12
+ example: '["str/len", "hello"] // => 5'
13
+ },
14
+ "str/upper": {
15
+ module: "str",
16
+ category: "std-str",
17
+ minArity: 1,
18
+ maxArity: 1,
19
+ description: "Convert to uppercase",
20
+ hasSideEffects: false,
21
+ returnType: "string",
22
+ params: [{ name: "s", type: "string", description: "The string" }],
23
+ example: '["str/upper", "hello"] // => "HELLO"'
24
+ },
25
+ "str/lower": {
26
+ module: "str",
27
+ category: "std-str",
28
+ minArity: 1,
29
+ maxArity: 1,
30
+ description: "Convert to lowercase",
31
+ hasSideEffects: false,
32
+ returnType: "string",
33
+ params: [{ name: "s", type: "string", description: "The string" }],
34
+ example: '["str/lower", "HELLO"] // => "hello"'
35
+ },
36
+ "str/trim": {
37
+ module: "str",
38
+ category: "std-str",
39
+ minArity: 1,
40
+ maxArity: 1,
41
+ description: "Remove leading and trailing whitespace",
42
+ hasSideEffects: false,
43
+ returnType: "string",
44
+ params: [{ name: "s", type: "string", description: "The string" }],
45
+ example: '["str/trim", " hello "] // => "hello"'
46
+ },
47
+ "str/trimStart": {
48
+ module: "str",
49
+ category: "std-str",
50
+ minArity: 1,
51
+ maxArity: 1,
52
+ description: "Remove leading whitespace",
53
+ hasSideEffects: false,
54
+ returnType: "string",
55
+ params: [{ name: "s", type: "string", description: "The string" }],
56
+ example: '["str/trimStart", " hello"] // => "hello"'
57
+ },
58
+ "str/trimEnd": {
59
+ module: "str",
60
+ category: "std-str",
61
+ minArity: 1,
62
+ maxArity: 1,
63
+ description: "Remove trailing whitespace",
64
+ hasSideEffects: false,
65
+ returnType: "string",
66
+ params: [{ name: "s", type: "string", description: "The string" }],
67
+ example: '["str/trimEnd", "hello "] // => "hello"'
68
+ },
69
+ "str/split": {
70
+ module: "str",
71
+ category: "std-str",
72
+ minArity: 2,
73
+ maxArity: 2,
74
+ description: "Split string into array by delimiter",
75
+ hasSideEffects: false,
76
+ returnType: "array",
77
+ params: [
78
+ { name: "s", type: "string", description: "The string" },
79
+ { name: "delim", type: "string", description: "Delimiter" }
80
+ ],
81
+ example: '["str/split", "a,b,c", ","] // => ["a", "b", "c"]'
82
+ },
83
+ "str/join": {
84
+ module: "str",
85
+ category: "std-str",
86
+ minArity: 2,
87
+ maxArity: 2,
88
+ description: "Join array elements into string",
89
+ hasSideEffects: false,
90
+ returnType: "string",
91
+ params: [
92
+ { name: "arr", type: "array", description: "Array to join" },
93
+ { name: "delim", type: "string", description: "Delimiter" }
94
+ ],
95
+ example: '["str/join", ["a", "b", "c"], ", "] // => "a, b, c"'
96
+ },
97
+ "str/slice": {
98
+ module: "str",
99
+ category: "std-str",
100
+ minArity: 2,
101
+ maxArity: 3,
102
+ description: "Extract substring",
103
+ hasSideEffects: false,
104
+ returnType: "string",
105
+ params: [
106
+ { name: "s", type: "string", description: "The string" },
107
+ { name: "start", type: "number", description: "Start index" },
108
+ { name: "end", type: "number", description: "End index (exclusive)", optional: true }
109
+ ],
110
+ example: '["str/slice", "hello", 1, 4] // => "ell"'
111
+ },
112
+ "str/replace": {
113
+ module: "str",
114
+ category: "std-str",
115
+ minArity: 3,
116
+ maxArity: 3,
117
+ description: "Replace first occurrence",
118
+ hasSideEffects: false,
119
+ returnType: "string",
120
+ params: [
121
+ { name: "s", type: "string", description: "The string" },
122
+ { name: "find", type: "string", description: "String to find" },
123
+ { name: "replace", type: "string", description: "Replacement" }
124
+ ],
125
+ example: '["str/replace", "hello world", "world", "there"] // => "hello there"'
126
+ },
127
+ "str/replaceAll": {
128
+ module: "str",
129
+ category: "std-str",
130
+ minArity: 3,
131
+ maxArity: 3,
132
+ description: "Replace all occurrences",
133
+ hasSideEffects: false,
134
+ returnType: "string",
135
+ params: [
136
+ { name: "s", type: "string", description: "The string" },
137
+ { name: "find", type: "string", description: "String to find" },
138
+ { name: "replace", type: "string", description: "Replacement" }
139
+ ],
140
+ example: '["str/replaceAll", "a-b-c", "-", "_"] // => "a_b_c"'
141
+ },
142
+ "str/includes": {
143
+ module: "str",
144
+ category: "std-str",
145
+ minArity: 2,
146
+ maxArity: 2,
147
+ description: "Check if string contains substring",
148
+ hasSideEffects: false,
149
+ returnType: "boolean",
150
+ params: [
151
+ { name: "s", type: "string", description: "The string" },
152
+ { name: "search", type: "string", description: "Substring to find" }
153
+ ],
154
+ example: '["str/includes", "hello world", "world"] // => true'
155
+ },
156
+ "str/startsWith": {
157
+ module: "str",
158
+ category: "std-str",
159
+ minArity: 2,
160
+ maxArity: 2,
161
+ description: "Check if string starts with prefix",
162
+ hasSideEffects: false,
163
+ returnType: "boolean",
164
+ params: [
165
+ { name: "s", type: "string", description: "The string" },
166
+ { name: "prefix", type: "string", description: "Prefix to check" }
167
+ ],
168
+ example: '["str/startsWith", "hello", "hel"] // => true'
169
+ },
170
+ "str/endsWith": {
171
+ module: "str",
172
+ category: "std-str",
173
+ minArity: 2,
174
+ maxArity: 2,
175
+ description: "Check if string ends with suffix",
176
+ hasSideEffects: false,
177
+ returnType: "boolean",
178
+ params: [
179
+ { name: "s", type: "string", description: "The string" },
180
+ { name: "suffix", type: "string", description: "Suffix to check" }
181
+ ],
182
+ example: '["str/endsWith", "hello", "lo"] // => true'
183
+ },
184
+ "str/padStart": {
185
+ module: "str",
186
+ category: "std-str",
187
+ minArity: 2,
188
+ maxArity: 3,
189
+ description: "Pad string from start to target length",
190
+ hasSideEffects: false,
191
+ returnType: "string",
192
+ params: [
193
+ { name: "s", type: "string", description: "The string" },
194
+ { name: "len", type: "number", description: "Target length" },
195
+ { name: "char", type: "string", description: "Padding character", optional: true, defaultValue: " " }
196
+ ],
197
+ example: '["str/padStart", "5", 3, "0"] // => "005"'
198
+ },
199
+ "str/padEnd": {
200
+ module: "str",
201
+ category: "std-str",
202
+ minArity: 2,
203
+ maxArity: 3,
204
+ description: "Pad string from end to target length",
205
+ hasSideEffects: false,
206
+ returnType: "string",
207
+ params: [
208
+ { name: "s", type: "string", description: "The string" },
209
+ { name: "len", type: "number", description: "Target length" },
210
+ { name: "char", type: "string", description: "Padding character", optional: true, defaultValue: " " }
211
+ ],
212
+ example: '["str/padEnd", "5", 3, "0"] // => "500"'
213
+ },
214
+ "str/repeat": {
215
+ module: "str",
216
+ category: "std-str",
217
+ minArity: 2,
218
+ maxArity: 2,
219
+ description: "Repeat string n times",
220
+ hasSideEffects: false,
221
+ returnType: "string",
222
+ params: [
223
+ { name: "s", type: "string", description: "The string" },
224
+ { name: "count", type: "number", description: "Repeat count" }
225
+ ],
226
+ example: '["str/repeat", "ab", 3] // => "ababab"'
227
+ },
228
+ "str/reverse": {
229
+ module: "str",
230
+ category: "std-str",
231
+ minArity: 1,
232
+ maxArity: 1,
233
+ description: "Reverse string",
234
+ hasSideEffects: false,
235
+ returnType: "string",
236
+ params: [{ name: "s", type: "string", description: "The string" }],
237
+ example: '["str/reverse", "hello"] // => "olleh"'
238
+ },
239
+ "str/capitalize": {
240
+ module: "str",
241
+ category: "std-str",
242
+ minArity: 1,
243
+ maxArity: 1,
244
+ description: "Capitalize first character",
245
+ hasSideEffects: false,
246
+ returnType: "string",
247
+ params: [{ name: "s", type: "string", description: "The string" }],
248
+ example: '["str/capitalize", "hello"] // => "Hello"'
249
+ },
250
+ "str/titleCase": {
251
+ module: "str",
252
+ category: "std-str",
253
+ minArity: 1,
254
+ maxArity: 1,
255
+ description: "Convert to Title Case",
256
+ hasSideEffects: false,
257
+ returnType: "string",
258
+ params: [{ name: "s", type: "string", description: "The string" }],
259
+ example: '["str/titleCase", "hello world"] // => "Hello World"'
260
+ },
261
+ "str/camelCase": {
262
+ module: "str",
263
+ category: "std-str",
264
+ minArity: 1,
265
+ maxArity: 1,
266
+ description: "Convert to camelCase",
267
+ hasSideEffects: false,
268
+ returnType: "string",
269
+ params: [{ name: "s", type: "string", description: "The string" }],
270
+ example: '["str/camelCase", "hello world"] // => "helloWorld"'
271
+ },
272
+ "str/kebabCase": {
273
+ module: "str",
274
+ category: "std-str",
275
+ minArity: 1,
276
+ maxArity: 1,
277
+ description: "Convert to kebab-case",
278
+ hasSideEffects: false,
279
+ returnType: "string",
280
+ params: [{ name: "s", type: "string", description: "The string" }],
281
+ example: '["str/kebabCase", "Hello World"] // => "hello-world"'
282
+ },
283
+ "str/snakeCase": {
284
+ module: "str",
285
+ category: "std-str",
286
+ minArity: 1,
287
+ maxArity: 1,
288
+ description: "Convert to snake_case",
289
+ hasSideEffects: false,
290
+ returnType: "string",
291
+ params: [{ name: "s", type: "string", description: "The string" }],
292
+ example: '["str/snakeCase", "Hello World"] // => "hello_world"'
293
+ },
294
+ "str/default": {
295
+ module: "str",
296
+ category: "std-str",
297
+ minArity: 2,
298
+ maxArity: 2,
299
+ description: "Return default if value is null/undefined/empty",
300
+ hasSideEffects: false,
301
+ returnType: "string",
302
+ params: [
303
+ { name: "s", type: "string | null", description: "The value" },
304
+ { name: "default", type: "string", description: "Default value" }
305
+ ],
306
+ example: '["str/default", null, "N/A"] // => "N/A"'
307
+ },
308
+ "str/template": {
309
+ module: "str",
310
+ category: "std-str",
311
+ minArity: 2,
312
+ maxArity: 2,
313
+ description: "Variable substitution in template string",
314
+ hasSideEffects: false,
315
+ returnType: "string",
316
+ params: [
317
+ { name: "template", type: "string", description: "Template with {placeholders}" },
318
+ { name: "vars", type: "object", description: "Variables to substitute" }
319
+ ],
320
+ example: '["str/template", "Hello, {name}!", {"name": "World"}] // => "Hello, World!"'
321
+ },
322
+ "str/truncate": {
323
+ module: "str",
324
+ category: "std-str",
325
+ minArity: 2,
326
+ maxArity: 3,
327
+ description: "Truncate string with optional suffix",
328
+ hasSideEffects: false,
329
+ returnType: "string",
330
+ params: [
331
+ { name: "s", type: "string", description: "The string" },
332
+ { name: "len", type: "number", description: "Maximum length" },
333
+ { name: "suffix", type: "string", description: "Suffix for truncated strings", optional: true, defaultValue: "..." }
334
+ ],
335
+ example: '["str/truncate", "Hello World", 8, "..."] // => "Hello..."'
336
+ }
337
+ };
338
+ function getStrOperators() {
339
+ return Object.keys(STR_OPERATORS);
340
+ }
341
+
342
+ export { STR_OPERATORS, getStrOperators };
343
+ //# sourceMappingURL=str.js.map
344
+ //# sourceMappingURL=str.js.map