@deslop/coding-standards 0.1.1082 → 0.1.1083
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 +12 -8
- package/dist/{MutableList-BCF17jPH.mjs → MutableList-Cpkiw3Cl.mjs} +174 -8
- package/dist/install.js +35 -80
- package/dist/oxlint.d.ts +76 -4
- package/dist/oxlint.js +409 -27
- package/package.json +1 -1
- package/skills/design/SKILL.md +52 -129
- package/skills/engineering/SKILL.md +178 -128
- package/skills/review/SKILL.md +37 -35
- package/skills/architecture/EVALS.md +0 -21
- package/skills/architecture/SKILL.md +0 -39
- package/skills/design/EVALS.md +0 -46
- package/skills/engineering/EVALS.md +0 -34
- package/skills/review/EVALS.md +0 -24
- package/skills/testing/EVALS.md +0 -22
- package/skills/testing/SKILL.md +0 -64
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Coding standards
|
|
2
2
|
|
|
3
|
-
A strict Oxlint preset and an installer for the
|
|
3
|
+
A strict Oxlint preset and an installer for the engineering, design and review skills. Requires Node 26+.
|
|
4
4
|
|
|
5
5
|
## Install the skills
|
|
6
6
|
|
|
@@ -10,9 +10,9 @@ Run inside a Git repository, including a linked worktree:
|
|
|
10
10
|
vpx @deslop/coding-standards@latest
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
It copies all package-owned skills into the repository's existing `.agents`, `.claude` and `.codex` directories
|
|
13
|
+
It copies all package-owned skills into the repository's existing `.agents`, `.claude` and `.codex` directories. It always writes `.claude`, which Claude Code reads, and writes `.agents` when no `.codex` exists. A refresh replaces only those names; destinations outside the repository or inside global agent configuration are rejected. Other skills, sign-ins, manifests, lockfiles and lint configuration stay unchanged. Edit package sources, then refresh installed copies with the CLI.
|
|
14
14
|
|
|
15
|
-
Use
|
|
15
|
+
Use engineering for mechanisms, code, tests and proof, design for visible behavior and review for independent critique and cleanup. Refer to another skill by name, not its installation path. Personal orchestration, delivery, machine commands and reply preferences stay outside this package.
|
|
16
16
|
|
|
17
17
|
## Use the lint preset
|
|
18
18
|
|
|
@@ -39,9 +39,9 @@ The preset needs Effect-tsgo's patched Oxlint, so keep the patch command in the
|
|
|
39
39
|
| Owner | Decision |
|
|
40
40
|
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
41
|
| `src/` | Flat package structure; rules in `src/rules`, no separate plugin or install-test harness |
|
|
42
|
-
| `skills/` | Maintained
|
|
42
|
+
| `skills/` | Maintained engineering, design and review sources; refresh repository copies from the TypeScript CLI, no build needed |
|
|
43
43
|
| Lint rules | Prefer an equivalent maintained rule before custom enforcement; consumer code conforms to strict standards, not the reverse. Fix broken or imprecise rules, not inconvenient valid diagnostics. A rule targets code the engineering skill and the other rules allow; an edge case that only unusual code reaches takes an inline disable with its reason, never a looser rule |
|
|
44
|
-
| Rule proof |
|
|
44
|
+
| Rule proof | Public CLI cases with accepted and rejected inputs; no severity or exclusion workaround |
|
|
45
45
|
|
|
46
46
|
With workspace dependencies installed, from the repository root:
|
|
47
47
|
|
|
@@ -66,7 +66,7 @@ node tools/coding-standards/src/install.ts
|
|
|
66
66
|
| [Cursor / pstack](https://github.com/cursor/plugins/tree/e43c7ee26e0038c6c1fa8380dd34ce86ff94cb2a/pstack) | Interface rationale, focused bug replay and defensible benchmarks; no playbook-stage machinery |
|
|
67
67
|
| [Kit Langton's Effect skill](https://github.com/kitlangton/skills/tree/71195e36024ebd2e66c5beac946e81eafd5abc43/skills/effect) | Schema construction/optionality, checked against actual [Effect 4 source](https://github.com/Effect-TS/effect/tree/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src) |
|
|
68
68
|
| [Vercel's agent skills](https://github.com/vercel-labs/agent-skills/tree/063bee94c3f4df8453406c830b0a7df0f2860278/skills) | Independent I/O and narrow subscriptions, translated to Effect/atoms; no manual React memoization |
|
|
69
|
-
| [Anthropic frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) and [Vercel design guidelines](https://vercel.com/design/guidelines) | Task-led composition, copy and interaction contracts (targets, focus, URL state, forms);
|
|
69
|
+
| [Anthropic frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) and [Vercel design guidelines](https://vercel.com/design/guidelines) | Task-led composition, copy and interaction contracts (targets, focus, URL state, forms); Critique keeps the generated-default list, not a studio persona |
|
|
70
70
|
| [Emil Kowalski's skills](https://github.com/emilkowalski/skills/tree/e8a175de22ae1e49370fc144c1f3bb9aeedf988d/skills) | Realistic layout stress, interruptible motion and mobile checks; no fixed variant picker or audit fan-out. Performance caveats checked against [Motion docs](https://motion.dev/docs/performance) |
|
|
71
71
|
| [Dillon Mulroy's skills](https://github.com/dmmulroy/skills/tree/8603380821fee6a77c82639f364ce8fe4f5a92be) and [anti-slop](https://github.com/dmmulroy/anti-slop/tree/c44ef22ca116d0ba62a3ff663a0bd13a3f3fa40b) | Reviewed Effect/error and cleanup approaches; retain our own service layout and ownership |
|
|
72
72
|
| [Interface Craft](https://www.interfacecraft.dev/library), the user's licensed library | Before-the-first-draft steps, range and depth, agent-run tuning, the four-pass critique, optical, color, type and motion values; ideas adapted in our words, no files copied |
|
|
@@ -74,7 +74,7 @@ node tools/coding-standards/src/install.ts
|
|
|
74
74
|
|
|
75
75
|
Additional sources for this refinement:
|
|
76
76
|
|
|
77
|
-
- [OpenClaw test audit](https://github.com/openclaw/openclaw/blob/main/.agents/skills/test-audit/SKILL.md):
|
|
77
|
+
- [OpenClaw test audit](https://github.com/openclaw/openclaw/blob/main/.agents/skills/test-audit/SKILL.md): deletion of tautological tests; retain independent boundary contracts.
|
|
78
78
|
- [Trail of Bits](https://github.com/trailofbits/skills): reproduce the strongest reachable counterexample and inspect variants of a known root cause; no routine security-audit machinery.
|
|
79
79
|
- [Bret Victor](https://worrydream.com/ExplorableExplanations/) and [Nicky Case](https://blog.ncase.me/how-i-make-an-explorable-explanation/): concrete cause and consequence, with optional exploration rather than mandatory navigation.
|
|
80
80
|
- [Taste skill](https://github.com/Leonxlnx/taste-skill/tree/a60a36dc2bb3bb77ccf17f2f62041f5ca8a458b9): real subject inventory and screenshot critique; no mandatory image, motion or component quotas.
|
|
@@ -83,6 +83,10 @@ Additional sources for this refinement:
|
|
|
83
83
|
- [Animated sprites](https://github.com/elithrar/dotfiles/tree/main/.agents/skills/animated-sprites): separate structural validity from perceptual motion and actual timing; no character assets required.
|
|
84
84
|
- [pstack correct](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/correct/SKILL.md), [caller migration](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md) and [design red flags](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/architect/references/design-red-flags.md): engineering's Patterns, with a canonical example per shape, whole-repository pattern changes and enforcement of repeated corrections above prose; no rule table beside the Patterns rows, no expiry dates on exceptions.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
- [obra/superpowers](https://github.com/obra/superpowers/tree/bb92a77741419a4ab5f06e711a283343f1ada0c3), [Matt Pocock](https://github.com/mattpocock/skills/tree/49dd158d1076134a641b33efb035946536778336) and [pstack](https://github.com/cursor/plugins/tree/09d06eb4b97a1020ab31e84030e38baf1099c7dc/pstack): recipes over prohibitions, requirement-to-proof mapping, domain-concept search, shrunk reproductions, the shared premise after two failed fixes, a behavior capture before refactors and three similar lines over an abstraction; no approval gates, test-first rituals or verification quotas.
|
|
87
|
+
- [Felix Rieseberg, How to be more ambitious](https://felixrieseberg.com/how-to-be-more-ambitious-a-tutorial-for-humans-with-models/): adversarial review by activity, never persona, from raw evidence, and the expert's unrequested check.
|
|
88
|
+
- [Emil Kowalski's animate skill](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/animate) and [Taste v2](https://github.com/Leonxlnx/taste-skill/tree/f624f37a8c650b9cc550253104925efe4c8de246): a slower pace for explanatory motion and measured overflow, clipping and font checks before visual critique.
|
|
89
|
+
|
|
90
|
+
These are selectively adapted ideas, not imported frameworks. Concrete behavior, existing stack and settled user decisions govern the maintained skills. Source inspection does not establish a model-quality improvement.
|
|
87
91
|
|
|
88
92
|
</details>
|
|
@@ -3283,7 +3283,7 @@ const String$2 = /*#__PURE__*/ make$2((self, that) => self < that ? -1 : 1);
|
|
|
3283
3283
|
* @category instances
|
|
3284
3284
|
* @since 4.0.0
|
|
3285
3285
|
*/
|
|
3286
|
-
const Number$
|
|
3286
|
+
const Number$2 = /*#__PURE__*/ make$2((self, that) => {
|
|
3287
3287
|
if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
|
|
3288
3288
|
if (globalThis.Number.isNaN(self)) return -1;
|
|
3289
3289
|
if (globalThis.Number.isNaN(that)) return 1;
|
|
@@ -3317,7 +3317,7 @@ const Number$1 = /*#__PURE__*/ make$2((self, that) => {
|
|
|
3317
3317
|
* @category instances
|
|
3318
3318
|
* @since 4.0.0
|
|
3319
3319
|
*/
|
|
3320
|
-
const BigInt = /*#__PURE__*/ make$2((self, that) => self < that ? -1 : 1);
|
|
3320
|
+
const BigInt$1 = /*#__PURE__*/ make$2((self, that) => self < that ? -1 : 1);
|
|
3321
3321
|
/**
|
|
3322
3322
|
* Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that
|
|
3323
3323
|
* maps values of type `B` to values of type `A`.
|
|
@@ -3383,7 +3383,7 @@ const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$2((b1, b2) => self(f(b1
|
|
|
3383
3383
|
* @category instances
|
|
3384
3384
|
* @since 2.0.0
|
|
3385
3385
|
*/
|
|
3386
|
-
const Date$1 = /*#__PURE__*/ mapInput(Number$
|
|
3386
|
+
const Date$1 = /*#__PURE__*/ mapInput(Number$2, (date) => date.getTime());
|
|
3387
3387
|
/**
|
|
3388
3388
|
* Checks whether one value is strictly less than another according to the given order.
|
|
3389
3389
|
*
|
|
@@ -3656,7 +3656,7 @@ const isSome = isSome$1;
|
|
|
3656
3656
|
* @category pattern matching
|
|
3657
3657
|
* @since 2.0.0
|
|
3658
3658
|
*/
|
|
3659
|
-
const match$
|
|
3659
|
+
const match$4 = /*#__PURE__*/ dual(2, (self, { onNone, onSome }) => isNone(self) ? onNone() : onSome(self.value));
|
|
3660
3660
|
/**
|
|
3661
3661
|
* Extracts the value from a `Some`, or evaluates a fallback thunk on `None`.
|
|
3662
3662
|
*
|
|
@@ -4544,7 +4544,7 @@ const map$2 = /*#__PURE__*/ dual(2, (self, f) => isSuccess(self) ? succeed(f(sel
|
|
|
4544
4544
|
* @category pattern matching
|
|
4545
4545
|
* @since 2.0.0
|
|
4546
4546
|
*/
|
|
4547
|
-
const match$
|
|
4547
|
+
const match$3 = /*#__PURE__*/ dual(2, (self, { onFailure, onSuccess }) => isFailure(self) ? onFailure(self.failure) : onSuccess(self.success));
|
|
4548
4548
|
/**
|
|
4549
4549
|
* Extracts the success value or throws the raw failure value `E`.
|
|
4550
4550
|
*
|
|
@@ -5023,7 +5023,7 @@ const ensure = (self) => Array$1.isArray(self) ? self : [self];
|
|
|
5023
5023
|
* @category pattern matching
|
|
5024
5024
|
* @since 2.0.0
|
|
5025
5025
|
*/
|
|
5026
|
-
const match$
|
|
5026
|
+
const match$2 = /*#__PURE__*/ dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
|
|
5027
5027
|
/**
|
|
5028
5028
|
* Pattern-matches on an array from the right, providing all elements except the
|
|
5029
5029
|
* last and the last element separately.
|
|
@@ -5408,6 +5408,36 @@ const take$1 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
|
5408
5408
|
return input.slice(0, clampCount(n, input.length));
|
|
5409
5409
|
});
|
|
5410
5410
|
/**
|
|
5411
|
+
* Removes the last `n` elements, creating a new array.
|
|
5412
|
+
*
|
|
5413
|
+
* **When to use**
|
|
5414
|
+
*
|
|
5415
|
+
* Use to remove the last `n` elements from an iterable.
|
|
5416
|
+
*
|
|
5417
|
+
* **Details**
|
|
5418
|
+
*
|
|
5419
|
+
* `n` is rounded down and clamped to `[0, length]`. `NaN` is treated as `0`.
|
|
5420
|
+
*
|
|
5421
|
+
* **Example** (Dropping from the end)
|
|
5422
|
+
*
|
|
5423
|
+
* ```ts import.meta.vitest
|
|
5424
|
+
* import { Array } from "effect"
|
|
5425
|
+
*
|
|
5426
|
+
* Array.dropRight([1, 2, 3, 4, 5], 2) // => [1, 2, 3]
|
|
5427
|
+
* ```
|
|
5428
|
+
*
|
|
5429
|
+
* @see {@link drop} — remove from the start
|
|
5430
|
+
* @see {@link takeRight} — keep from the end
|
|
5431
|
+
*
|
|
5432
|
+
* @stability stable
|
|
5433
|
+
* @category getters
|
|
5434
|
+
* @since 2.0.0
|
|
5435
|
+
*/
|
|
5436
|
+
const dropRight = /*#__PURE__*/ dual(2, (self, n) => {
|
|
5437
|
+
const input = fromIterable(self);
|
|
5438
|
+
return input.slice(0, input.length - clampCount(n, input.length));
|
|
5439
|
+
});
|
|
5440
|
+
/**
|
|
5411
5441
|
* Returns the index of the first element matching the predicate, wrapped in an
|
|
5412
5442
|
* `Option`.
|
|
5413
5443
|
*
|
|
@@ -6211,6 +6241,96 @@ const Error$1 = Error$2;
|
|
|
6211
6241
|
* @since 2.0.0
|
|
6212
6242
|
*/
|
|
6213
6243
|
const TaggedError = TaggedError$1;
|
|
6244
|
+
//#endregion
|
|
6245
|
+
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Number.js
|
|
6246
|
+
/**
|
|
6247
|
+
* Exposes the global number constructor.
|
|
6248
|
+
*
|
|
6249
|
+
* **When to use**
|
|
6250
|
+
*
|
|
6251
|
+
* Use to access native JavaScript numeric coercion from the Effect module
|
|
6252
|
+
* namespace.
|
|
6253
|
+
*
|
|
6254
|
+
* **Gotchas**
|
|
6255
|
+
*
|
|
6256
|
+
* This follows native `Number` coercion rules, including empty strings
|
|
6257
|
+
* becoming `0` and invalid numeric strings becoming `NaN`.
|
|
6258
|
+
*
|
|
6259
|
+
* @see {@link parse} for parsing strings into an `Option`
|
|
6260
|
+
*
|
|
6261
|
+
* **Example** (Coercing values to numbers)
|
|
6262
|
+
*
|
|
6263
|
+
* ```ts import.meta.vitest
|
|
6264
|
+
* import { Number as N } from "effect"
|
|
6265
|
+
*
|
|
6266
|
+
* N.Number("42") // => 42
|
|
6267
|
+
* N.Number("3.14") // => 3.14
|
|
6268
|
+
* ```
|
|
6269
|
+
*
|
|
6270
|
+
* @stability stable
|
|
6271
|
+
* @category constructors
|
|
6272
|
+
* @since 4.0.0
|
|
6273
|
+
*/
|
|
6274
|
+
const Number$1 = globalThis.Number;
|
|
6275
|
+
/**
|
|
6276
|
+
* Parses a `number` from a `string` safely using the `Number()` function.
|
|
6277
|
+
* The following special string values are supported: "NaN", "Infinity", "-Infinity".
|
|
6278
|
+
*
|
|
6279
|
+
* **When to use**
|
|
6280
|
+
*
|
|
6281
|
+
* Use to parse numeric text without throwing on invalid input.
|
|
6282
|
+
*
|
|
6283
|
+
* **Example** (Parsing numbers from strings)
|
|
6284
|
+
*
|
|
6285
|
+
* ```ts import.meta.vitest
|
|
6286
|
+
* import { Number, Option } from "effect"
|
|
6287
|
+
*
|
|
6288
|
+
* Number.parse("42") // => Option.some(42)
|
|
6289
|
+
* Number.parse("3.14") // => Option.some(3.14)
|
|
6290
|
+
* Number.parse("NaN") // => Option.some(NaN)
|
|
6291
|
+
* Number.parse("Infinity") // => Option.some(Infinity)
|
|
6292
|
+
* Number.parse("-Infinity") // => Option.some(-Infinity)
|
|
6293
|
+
* Number.parse("not a number") // => Option.none()
|
|
6294
|
+
* ```
|
|
6295
|
+
*
|
|
6296
|
+
* @see {@link Number} for native constructor coercion
|
|
6297
|
+
*
|
|
6298
|
+
* @stability stable
|
|
6299
|
+
* @category constructors
|
|
6300
|
+
* @since 2.0.0
|
|
6301
|
+
*/
|
|
6302
|
+
const parse = (s) => {
|
|
6303
|
+
if (s === "NaN") return some$1(NaN);
|
|
6304
|
+
if (s === "Infinity") return some$1(Infinity);
|
|
6305
|
+
if (s === "-Infinity") return some$1(-Infinity);
|
|
6306
|
+
if (s.trim() === "") return none();
|
|
6307
|
+
const n = Number$1(s);
|
|
6308
|
+
return Number$1.isNaN(n) ? none() : some$1(n);
|
|
6309
|
+
};
|
|
6310
|
+
/**
|
|
6311
|
+
* Returns the number rounded with the given precision.
|
|
6312
|
+
*
|
|
6313
|
+
* **When to use**
|
|
6314
|
+
*
|
|
6315
|
+
* Use to round a number to a fixed number of decimal places.
|
|
6316
|
+
*
|
|
6317
|
+
* **Example** (Rounding with precision)
|
|
6318
|
+
*
|
|
6319
|
+
* ```ts import.meta.vitest
|
|
6320
|
+
* import { Number } from "effect"
|
|
6321
|
+
*
|
|
6322
|
+
* Number.round(1.1234, 2) // => 1.12
|
|
6323
|
+
* Number.round(1.567, 2) // => 1.57
|
|
6324
|
+
* ```
|
|
6325
|
+
*
|
|
6326
|
+
* @stability stable
|
|
6327
|
+
* @category math
|
|
6328
|
+
* @since 3.8.0
|
|
6329
|
+
*/
|
|
6330
|
+
const round = /*#__PURE__*/ dual(2, (self, precision) => {
|
|
6331
|
+
const factor = Math.pow(10, precision);
|
|
6332
|
+
return Math.round(self * factor) / factor;
|
|
6333
|
+
});
|
|
6214
6334
|
globalThis.String;
|
|
6215
6335
|
/**
|
|
6216
6336
|
* Provides an `Order` instance for comparing strings using lexicographic
|
|
@@ -6232,6 +6352,28 @@ globalThis.String;
|
|
|
6232
6352
|
*/
|
|
6233
6353
|
const Order = String$2;
|
|
6234
6354
|
/**
|
|
6355
|
+
* Replaces matches in a string using `String.prototype.replace`.
|
|
6356
|
+
*
|
|
6357
|
+
* **Details**
|
|
6358
|
+
*
|
|
6359
|
+
* String search values and non-global regular expressions replace the first
|
|
6360
|
+
* match; global regular expressions replace every match.
|
|
6361
|
+
*
|
|
6362
|
+
* **Example** (Replacing a substring)
|
|
6363
|
+
*
|
|
6364
|
+
* ```ts import.meta.vitest
|
|
6365
|
+
* import { pipe, String } from "effect"
|
|
6366
|
+
*
|
|
6367
|
+
* pipe("abc", String.replace("b", "d")) // => "adc"
|
|
6368
|
+
* pipe("hello world", String.replace("world", "Effect")) // => "hello Effect"
|
|
6369
|
+
* ```
|
|
6370
|
+
*
|
|
6371
|
+
* @stability stable
|
|
6372
|
+
* @category transforming
|
|
6373
|
+
* @since 2.0.0
|
|
6374
|
+
*/
|
|
6375
|
+
const replace = (searchValue, replaceValue) => (self) => self.replace(searchValue, replaceValue);
|
|
6376
|
+
/**
|
|
6235
6377
|
* Removes whitespace from both ends of a string.
|
|
6236
6378
|
*
|
|
6237
6379
|
* **Example** (Trimming whitespace)
|
|
@@ -6342,7 +6484,7 @@ const startsWith = (searchString, position) => (self) => self.startsWith(searchS
|
|
|
6342
6484
|
* @category searching
|
|
6343
6485
|
* @since 2.0.0
|
|
6344
6486
|
*/
|
|
6345
|
-
const match = (regExp) => (self) => fromNullOr(self.match(regExp));
|
|
6487
|
+
const match$1 = (regExp) => (self) => fromNullOr(self.match(regExp));
|
|
6346
6488
|
/**
|
|
6347
6489
|
* Replaces all occurrences of a substring or pattern in a string.
|
|
6348
6490
|
*
|
|
@@ -6360,6 +6502,30 @@ const match = (regExp) => (self) => fromNullOr(self.match(regExp));
|
|
|
6360
6502
|
* @since 2.0.0
|
|
6361
6503
|
*/
|
|
6362
6504
|
const replaceAll = (searchValue, replaceValue) => (self) => self.replaceAll(searchValue, replaceValue);
|
|
6505
|
+
globalThis.Boolean;
|
|
6506
|
+
/**
|
|
6507
|
+
* Chooses between two lazy branches based on a boolean value.
|
|
6508
|
+
*
|
|
6509
|
+
* **When to use**
|
|
6510
|
+
*
|
|
6511
|
+
* Use to choose between two lazy branches based on a boolean value.
|
|
6512
|
+
*
|
|
6513
|
+
* **Example** (Pattern matching on booleans)
|
|
6514
|
+
*
|
|
6515
|
+
* ```ts import.meta.vitest
|
|
6516
|
+
* import { Boolean } from "effect"
|
|
6517
|
+
*
|
|
6518
|
+
* Boolean.match(true, {
|
|
6519
|
+
* onFalse: () => "It's false!",
|
|
6520
|
+
* onTrue: () => "It's true!"
|
|
6521
|
+
* }) // => "It's true!"
|
|
6522
|
+
* ```
|
|
6523
|
+
*
|
|
6524
|
+
* @stability stable
|
|
6525
|
+
* @category pattern matching
|
|
6526
|
+
* @since 2.0.0
|
|
6527
|
+
*/
|
|
6528
|
+
const match = /*#__PURE__*/ dual(2, (value, options) => value ? options.onTrue() : options.onFalse());
|
|
6363
6529
|
//#endregion
|
|
6364
6530
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/MutableRef.js
|
|
6365
6531
|
const TypeId = "~effect/MutableRef";
|
|
@@ -6829,4 +6995,4 @@ const toArrayN = (self, n) => {
|
|
|
6829
6995
|
*/
|
|
6830
6996
|
const toArray = (self) => toArrayN(self, self.length);
|
|
6831
6997
|
//#endregion
|
|
6832
|
-
export {
|
|
6998
|
+
export { makeEquivalence as $, formatDate as $n, isLessThanOrEqualTo as $t, dedupeWith as A, evaluate as An, isObject as Ar, flatMap$2 as At, flatMap as B, isFailReason as Bn, constTrue as Br, match$4 as Bt, TaggedError as C, causeFail as Cn, isFunction as Cr, succeed as Ct, contains as D, contAll as Dn, isNotUndefined as Dr, exists as Dt, appendAll as E, contA as En, isNotNullish as Er, contains$1 as Et, filter as F, isCause as Fn, isString as Fr, getOrUndefined as Ft, getSomes as G, assignProperty as Gn, identity as Gr, zipWith as Gt, forEach as H, makePrimitive as Hn, constVoid as Hr, orElse as Ht, filterMap as I, isDieReason as In, isTagged as Ir, isNone as It, isArrayNonEmpty as J, setStackTraceLimit as Jn, pipe as Jr, Number$2 as Jt, head as K, internalCall as Kn, memoize as Kr, BigInt$1 as Kt, findFirst as L, isDone as Ln, isUndefined as Lr, isSome as Lt, empty as M, exitFail as Mn, isPropertyKey as Mr, fromNullishOr as Mt, ensure as N, exitFailCause as Nn, isReadonlyObject as Nr, fromUndefinedOr as Nt, containsWith as O, contE as On, isNullish as Or, filter$1 as Ot, every as P, exitSucceed as Pn, isRegExp as Pr, getOrElse as Pt, last as Q, format as Qn, isLessThan as Qt, findFirstIndex as R, isEffect as Rn, isUnknown as Rr, liftThrowable as Rt, Error$1 as S, causeEmpty as Sn, isError as Sr, match$3 as St, append$1 as T, constEmptyAnnotations as Tn, isNotNull as Tr, all as Tt, fromIterable as U, makePrimitiveProto as Un, constant as Ur, some$1 as Ut, flatten as V, isInterruptReason as Vn, constUndefined as Vr, none as Vt, get$1 as W, withFiber as Wn, dual as Wr, toArray$1 as Wt, isReadonlyArrayNonEmpty as X, NodeInspectSymbol as Xn, Prototype as Xr, isGreaterThan as Xt, isCanonicalArrayIndex as Y, BaseProto as Yn, Class$1 as Yr, String$2 as Yt, join as Z, toStringUnknown as Zn, pipeArguments as Zr, isGreaterThanOrEqualTo as Zt, startsWith as _, args as _n, structureKeys as _r, fromOption as _t, takeN as a, CauseImpl as an, symbolRedactable as ar, reduce as at, parse as b, causeCombine as bn, isBigInt as br, isSuccess as bt, make$1 as c, Error$2 as cn, equals as cr, take$1 as ct, Order as d, InterruptorStackTrace as dn, combine as dr, makeEquivalence$1 as dt, make$2 as en, formatJson as er, map as et, includes as f, PipeInspectableProto as fn, hash as fr, map$1 as ft, split as g, Yield as gn, structure as gr, flatMap$1 as gt, replaceAll as h, TaggedError$1 as hn, string as hr, fail as ht, take as i, strictEqual as in, redact as ir, prepend as it, dropRight as j, exitDie as jn, isObjectKeyword as jr, flatten$1 as jt, dedupe as k, done as kn, isNumber as kr, firstSomeOf as kt, update as l, ExitTypeId as ln, symbol as lr, fromEntries as lt, replace as m, StackTraceKey as mn, optimize as mr, values as mt, clear as n, Tuple as nn, formatPropertyKey as nr, matchRight as nt, toArray as o, Die as on, asEquivalence as or, some as ot, match$1 as p, ReasonBase as pn, number as pr, remove as pt, isArrayEmpty as q, getStackTraceLimit as qn, memoizeIdempotent as qr, Date$1 as qt, make as r, make$3 as rn, currentFiberTypeId as rr, of as rt, get as s, Done as sn, byReferenceUnsafe as sr, sort as st, append as t, mapInput as tn, formatPath as tr, match$2 as tt, match as u, Fail as un, array as ur, get$2 as ut, trim as v, causeAddInterrupts as vn, symbol$1 as vr, getOrThrow as vt, taggedEnum as w, causeFromReasons as wn, isIterable as wr, normalize as wt, round as x, causeDie as xn, isBoolean as xr, map$2 as xt, trimEnd as y, causeAnnotate as yn, hasProperty as yr, isFailure as yt, findLast as z, isExit as zn, constFalse as zr, map$3 as zt };
|