go-go-try 6.1.0 → 7.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.
@@ -1,24 +1,76 @@
1
1
  name: CI
2
+
2
3
  on:
3
- - push
4
- - pull_request
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+
5
13
  jobs:
6
- test:
7
- name: Node.js ${{ matrix.node-version }}
8
- runs-on: ubuntu-latest
9
- strategy:
10
- # `fail-fast` is set to `false` because we won't know which Node versions are failing and which are passing
11
- fail-fast: false
12
- matrix:
13
- node-version:
14
- - 18
15
- - 16
16
- - 14
17
- - 12
18
- steps:
19
- - uses: actions/checkout@v3
20
- - uses: actions/setup-node@v3
21
- with:
22
- node-version: ${{ matrix.node-version }}
23
- - run: yarn install
24
- - run: yarn test
14
+ test:
15
+ name: Node.js ${{ matrix.node-version }}
16
+ runs-on: ubuntu-latest
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ node-version:
21
+ - 22
22
+ - 20
23
+ - 18
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Setup Node.js ${{ matrix.node-version }}
28
+ uses: actions/setup-node@v4
29
+ with:
30
+ node-version: ${{ matrix.node-version }}
31
+ cache: npm
32
+
33
+ - name: Install dependencies
34
+ run: npm ci
35
+
36
+ - name: Build
37
+ run: npm run build
38
+
39
+ - name: Run tests
40
+ run: npx vitest run --coverage
41
+
42
+ - name: Upload coverage to Codecov
43
+ if: matrix.node-version == 22
44
+ uses: codecov/codecov-action@v4
45
+ with:
46
+ files: ./coverage/lcov.info
47
+ fail_ci_if_error: false
48
+
49
+ publish:
50
+ name: Publish to npm
51
+ needs: test
52
+ runs-on: ubuntu-latest
53
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
54
+ permissions:
55
+ contents: read
56
+ id-token: write
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+
60
+ - name: Setup Node.js
61
+ uses: actions/setup-node@v4
62
+ with:
63
+ node-version: 22
64
+ registry-url: https://registry.npmjs.org
65
+ cache: npm
66
+
67
+ - name: Install dependencies
68
+ run: npm ci
69
+
70
+ - name: Build
71
+ run: npm run build
72
+
73
+ - name: Publish with provenance
74
+ run: npm publish --provenance --access public
75
+ env:
76
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -0,0 +1,87 @@
1
+ # Contributing to go-go-try
2
+
3
+ Thank you for your interest in contributing to go-go-try! This document provides guidelines for contributing to the project.
4
+
5
+ ## Development Setup
6
+
7
+ 1. Fork and clone the repository
8
+ 2. Install dependencies:
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ ## Development Workflow
14
+
15
+ ### Building
16
+
17
+ ```bash
18
+ npm run build
19
+ ```
20
+
21
+ ### Testing
22
+
23
+ ```bash
24
+ # Run all tests
25
+ npm test
26
+
27
+ # Run tests in watch mode
28
+ npx vitest
29
+
30
+ # Run tests with coverage
31
+ npx vitest run --coverage
32
+ ```
33
+
34
+ ### Linting
35
+
36
+ ```bash
37
+ npm run lint
38
+ ```
39
+
40
+ ## Coding Style
41
+
42
+ - Use TypeScript for all new code
43
+ - Follow the existing code style (enforced by Biome)
44
+ - Write comprehensive tests for new features
45
+ - Ensure all tests pass before submitting PR
46
+
47
+ ## Commit Guidelines
48
+
49
+ - Use clear, descriptive commit messages
50
+ - Reference issue numbers when applicable
51
+ - Keep commits focused and atomic
52
+
53
+ ## Pull Request Process
54
+
55
+ 1. Ensure your branch is up to date with `main`
56
+ 2. Run the full test suite: `npm test`
57
+ 3. Update documentation if needed
58
+ 4. Submit PR with a clear description of changes
59
+ 5. Wait for CI checks to pass
60
+ 6. Address any review feedback
61
+
62
+ ## Adding New Features
63
+
64
+ When adding new features:
65
+
66
+ 1. Add type definitions first
67
+ 2. Implement the feature with full type safety
68
+ 3. Add comprehensive tests covering:
69
+ - Happy path
70
+ - Error cases
71
+ - Edge cases (null, undefined, etc.)
72
+ 4. Update README.md with usage examples
73
+ 5. Update CHANGELOG.md
74
+
75
+ ## Reporting Bugs
76
+
77
+ When reporting bugs, please include:
78
+
79
+ - Clear description of the issue
80
+ - Steps to reproduce
81
+ - Expected vs actual behavior
82
+ - Node.js and TypeScript versions
83
+ - Minimal code example if possible
84
+
85
+ ## Questions?
86
+
87
+ Feel free to open an issue for any questions or discussions.
package/README.md CHANGED
@@ -30,7 +30,7 @@ Why not just `try`/`catch`?
30
30
  npm install go-go-try
31
31
  ```
32
32
 
33
- ## Usage
33
+ ## Basic Usage
34
34
 
35
35
  ```ts
36
36
  import { goTry, goTryRaw } from 'go-go-try'
@@ -53,13 +53,242 @@ const [err, todos = []] = await goTryRaw(fetchTodos()) // err is Error | undefin
53
53
  if (err) sendToErrorTrackingService(err)
54
54
  ```
55
55
 
56
+ ## Advanced Usage
57
+
58
+ ### Sequential Async Operations
59
+
60
+ Chain multiple async operations with clean error handling:
61
+
62
+ ```ts
63
+ import { goTry } from 'go-go-try'
64
+
65
+ async function fetchUserData(userId: string) {
66
+ // Fetch user
67
+ const [fetchErr, user] = await goTry(fetch(`/api/users/${userId}`))
68
+ if (fetchErr) return [fetchErr, undefined] as const
69
+
70
+ // Parse response
71
+ const [parseErr, data] = await goTry(user!.json())
72
+ if (parseErr) return [parseErr, undefined] as const
73
+
74
+ // Validate/transform
75
+ const [validateErr, validated] = goTry(() => validateUser(data!))
76
+ if (validateErr) return [validateErr, undefined] as const
77
+
78
+ return [undefined, validated] as const
79
+ }
80
+
81
+ const [err, user] = await fetchUserData('123')
82
+ if (err) {
83
+ console.error('Failed to fetch user:', err)
84
+ } else {
85
+ console.log('User:', user)
86
+ }
87
+ ```
88
+
89
+ ### Parallel Execution with `goTryAll`
90
+
91
+ Execute multiple promises in parallel:
92
+
93
+ ```ts
94
+ import { goTryAll } from 'go-go-try'
95
+
96
+ const [errors, results] = await goTryAll([
97
+ fetchUser(userId),
98
+ fetchPosts(userId),
99
+ fetchComments(userId)
100
+ ])
101
+
102
+ // errors is (string | undefined)[]
103
+ // results is (User | Posts | Comments | undefined)[]
104
+
105
+ const [user, posts, comments] = results
106
+ ```
107
+
108
+ ### Safe Unwrapping with `goTryOr`
109
+
110
+ Like `goTry`, but returns a default value on failure instead of `undefined`:
111
+
112
+ > **Note:** For static default values, you can use destructuring instead:
113
+ > ```ts
114
+ > // These are equivalent for static defaults:
115
+ > const [err, config = {port: 3000}] = goTry(() => JSON.parse(configString))
116
+ > const [err, config] = goTryOr(() => JSON.parse(configString), {port: 3000})
117
+ > ```
118
+ > Use `goTryOr` when you need **lazy evaluation** (the default is only computed on failure):
119
+
120
+ ```ts
121
+ import { goTryOr } from 'go-go-try'
122
+
123
+ // ✅ Use goTryOr with a function for lazy evaluation - default only computed on failure
124
+ const [err, user] = await goTryOr(fetchUser(id), () => ({
125
+ id: 'anonymous',
126
+ name: 'Guest',
127
+ createdAt: new Date() // This won't run on success
128
+ }))
129
+
130
+ // ❌ Avoid: wasteful - createDefault() runs even on success
131
+ const [err, config = createDefault()] = goTry(loadConfig())
132
+
133
+ // ✅ Better: lazy - createDefault() only runs on failure
134
+ const [err, config] = goTryOr(loadConfig(), () => createDefault())
135
+ ```
136
+
137
+ ### Express/Fastify Error Handling
138
+
139
+ Use in API route handlers:
140
+
141
+ ```ts
142
+ import { goTry } from 'go-go-try'
143
+ import express from 'express'
144
+
145
+ const app = express()
146
+
147
+ app.post('/users', async (req, res) => {
148
+ const [err, user] = await goTry(createUser(req.body))
149
+
150
+ if (err) {
151
+ return res.status(400).json({ error: err })
152
+ }
153
+
154
+ res.json(user)
155
+ })
156
+
157
+ // Batch endpoint
158
+ app.post('/batch', async (req, res) => {
159
+ const [errors, results] = await goTryAll(
160
+ req.body.operations.map(op => processOperation(op))
161
+ )
162
+
163
+ const hasErrors = errors.some(e => e !== undefined)
164
+
165
+ res.status(hasErrors ? 207 : 200).json({
166
+ results,
167
+ errors: errors.filter(Boolean)
168
+ })
169
+ })
170
+ ```
171
+
172
+ ### Type Guards
173
+
174
+ Narrow types using `isSuccess` and `isFailure`:
175
+
176
+ ```ts
177
+ import { goTry, isSuccess, isFailure } from 'go-go-try'
178
+
179
+ const result = goTry(() => riskyOperation())
180
+
181
+ if (isSuccess(result)) {
182
+ // result[1] is typed as T (not T | undefined)
183
+ console.log(result[1])
184
+ } else if (isFailure(result)) {
185
+ // result[0] is typed as E (not E | undefined)
186
+ console.error(result[0])
187
+ }
188
+ ```
189
+
190
+ You can also narrow types by destructuring and checking the error:
191
+
192
+ ```ts
193
+ const [err, value] = goTry(() => riskyOperation())
194
+
195
+ if (err === undefined) {
196
+ // value is typed as T (not T | undefined)
197
+ console.log(value)
198
+ } else {
199
+ // err is typed as string (not string | undefined)
200
+ console.error(err)
201
+ // value is typed as undefined in this branch
202
+ }
203
+ ```
204
+
205
+ ### Helper Functions
206
+
207
+ Build custom utilities on top of the primitives:
208
+
209
+ ```ts
210
+ import { goTry, success, failure, type Result } from 'go-go-try'
211
+
212
+ // Custom validation helper
213
+ function validateEmail(email: string): Result<string, string> {
214
+ if (!email.includes('@')) {
215
+ return failure('Invalid email format')
216
+ }
217
+ return success(email.toLowerCase().trim())
218
+ }
219
+
220
+ // Usage
221
+ const [err, normalizedEmail] = validateEmail('User@Example.COM')
222
+ if (err) {
223
+ console.error(err) // Doesn't trigger
224
+ } else {
225
+ console.log(normalizedEmail) // 'user@example.com'
226
+ }
227
+ ```
228
+
56
229
  ## API
57
230
 
58
- **First parameter** accepts:
231
+ ### `goTry<T>(value)`
59
232
 
60
- - synchronous/asynchronous function / Promise
233
+ Executes a function, promise, or value and returns a Result type with error message as string.
61
234
 
62
- **Returns** a tuple with the possible error and result as `[Err | undefined, T | undefined]` (Golang style)
235
+ ```ts
236
+ function goTry<T>(value: T | Promise<T> | (() => T | Promise<T>)): Result<string, T> | Promise<Result<string, T>>
237
+ ```
238
+
239
+ ### `goTryRaw<T, E>(value)`
240
+
241
+ Like `goTry` but returns the raw Error object instead of just the message.
242
+
243
+ ```ts
244
+ function goTryRaw<T, E = Error>(value: T | Promise<T> | (() => T | Promise<T>)): Result<E, T> | Promise<Result<E, T>>
245
+ ```
246
+
247
+ ### `goTryAll<T>(promises)`
248
+
249
+ Executes multiple promises in parallel. Returns a tuple of `[errors, results]`.
250
+
251
+ ```ts
252
+ function goTryAll<T extends readonly unknown[]>(
253
+ promises: { [K in keyof T]: Promise<T[K]> }
254
+ ): Promise<[string[] | undefined, { [K in keyof T]: T[K] | undefined }]>
255
+ ```
256
+
257
+ ### `goTryOr<T>(value, defaultValue)`
258
+
259
+ Like `goTry`, but returns a default value on failure instead of `undefined`.
260
+ The default can be either a static value or a function (for lazy evaluation).
261
+
262
+ ```ts
263
+ function goTryOr<T>(value: T | Promise<T> | (() => T | Promise<T>), defaultValue: T | (() => T)): Result<string, T> | Promise<Result<string, T>>
264
+ ```
265
+
266
+ ### `isSuccess(result)` / `isFailure(result)`
267
+
268
+ Type guards to check result status.
269
+
270
+ ```ts
271
+ function isSuccess<E, T>(result: Result<E, T>): result is Success<T>
272
+ function isFailure<E, T>(result: Result<E, T>): result is Failure<E>
273
+ ```
274
+
275
+ ### `success(value)` / `failure(error)`
276
+
277
+ Helper functions to create Result tuples.
278
+
279
+ ```ts
280
+ function success<T>(value: T): Success<T>
281
+ function failure<E>(error: E): Failure<E>
282
+ ```
283
+
284
+ ## Types
285
+
286
+ ```ts
287
+ type Success<T> = readonly [undefined, T]
288
+ type Failure<E> = readonly [E, undefined]
289
+ type Result<E, T> = Success<T> | Failure<E>
290
+ ```
63
291
 
292
+ ## License
64
293
 
65
- If you use TypeScript, the types are well defined and won't let you make a mistake.
294
+ MIT
package/dist/index.cjs CHANGED
@@ -12,6 +12,52 @@ function success(value) {
12
12
  function failure(error) {
13
13
  return [error, void 0];
14
14
  }
15
+ function resolveDefault(defaultValue) {
16
+ return typeof defaultValue === "function" ? defaultValue() : defaultValue;
17
+ }
18
+ function goTryOr(value, defaultValue) {
19
+ try {
20
+ const result = typeof value === "function" ? value() : value;
21
+ if (isPromise(result)) {
22
+ return result.then((resolvedValue) => success(resolvedValue)).catch((err) => [getErrorMessage(err), resolveDefault(defaultValue)]);
23
+ }
24
+ return success(result);
25
+ } catch (err) {
26
+ return [getErrorMessage(err), resolveDefault(defaultValue)];
27
+ }
28
+ }
29
+ async function goTryAll(promises) {
30
+ const settled = await Promise.allSettled(promises);
31
+ const errors = [];
32
+ const results = [];
33
+ for (const item of settled) {
34
+ if (item.status === "fulfilled") {
35
+ errors.push(void 0);
36
+ results.push(item.value);
37
+ } else {
38
+ errors.push(getErrorMessage(item.reason));
39
+ results.push(void 0);
40
+ }
41
+ }
42
+ return [errors, results];
43
+ }
44
+ async function goTrySettled(promises) {
45
+ const settled = await Promise.allSettled(promises);
46
+ const errors = [];
47
+ const results = [];
48
+ for (const item of settled) {
49
+ if (item.status === "fulfilled") {
50
+ errors.push(void 0);
51
+ results.push(item.value);
52
+ } else {
53
+ errors.push(
54
+ isError(item.reason) ? item.reason : new Error(String(item.reason))
55
+ );
56
+ results.push(void 0);
57
+ }
58
+ }
59
+ return [errors, results];
60
+ }
15
61
  function getErrorMessage(error) {
16
62
  if (error === void 0) return "undefined";
17
63
  if (typeof error === "string") return error;
@@ -64,7 +110,10 @@ function goTryRaw(value) {
64
110
 
65
111
  exports.failure = failure;
66
112
  exports.goTry = goTry;
113
+ exports.goTryAll = goTryAll;
114
+ exports.goTryOr = goTryOr;
67
115
  exports.goTryRaw = goTryRaw;
116
+ exports.goTrySettled = goTrySettled;
68
117
  exports.isFailure = isFailure;
69
118
  exports.isSuccess = isSuccess;
70
119
  exports.success = success;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,77 @@
1
1
  type Success<T> = readonly [undefined, T];
2
2
  type Failure<E> = readonly [E, undefined];
3
3
  type Result<E, T> = Success<T> | Failure<E>;
4
+ type ResultWithDefault<E, T> = readonly [E | undefined, T];
4
5
  type MaybePromise<T> = T | Promise<T>;
5
6
  declare function isSuccess<E, T>(result: Result<E, T>): result is Success<T>;
6
7
  declare function isFailure<E, T>(result: Result<E, T>): result is Failure<E>;
7
8
  declare function success<T>(value: T): Success<T>;
8
9
  declare function failure<E>(error: E): Failure<E>;
10
+ /**
11
+ * Executes a function, promise, or value and returns a Result type with a fallback default.
12
+ * If an error occurs, it returns the error message and the default value.
13
+ *
14
+ * @template T The type of the successful result
15
+ * @param {T | Promise<T> | (() => T | Promise<T>)} value - The value, promise, or function to execute
16
+ * @param {T | (() => T)} defaultValue - The default value or a function to compute it (only called on failure)
17
+ * @returns {ResultWithDefault<string, T> | Promise<ResultWithDefault<string, T>>} A tuple of [error, value] or Promise thereof
18
+ *
19
+ * @example
20
+ * // With a static default
21
+ * const [err, config] = goTryOr(() => JSON.parse('invalid'), { port: 3000 })
22
+ * // err is the error message, config is { port: 3000 }
23
+ *
24
+ * @example
25
+ * // With a computed default (lazy evaluation)
26
+ * const [err, user] = await goTryOr(fetchUser(id), () => ({
27
+ * id: 'anonymous',
28
+ * name: 'Guest'
29
+ * }))
30
+ */
31
+ declare function goTryOr<T>(fn: () => never, defaultValue: T | (() => T)): ResultWithDefault<string, T>;
32
+ declare function goTryOr<T>(fn: () => Promise<T>, defaultValue: T | (() => T)): Promise<ResultWithDefault<string, T>>;
33
+ declare function goTryOr<T>(promise: Promise<T>, defaultValue: T | (() => T)): Promise<ResultWithDefault<string, T>>;
34
+ declare function goTryOr<T>(fn: () => T, defaultValue: T | (() => T)): ResultWithDefault<string, T>;
35
+ declare function goTryOr<T>(value: T, defaultValue: T | (() => T)): ResultWithDefault<string, T>;
36
+ /**
37
+ * Executes multiple promises in parallel and returns a tuple of [errors, results].
38
+ * Unlike Promise.all, this doesn't fail fast - it waits for all promises to settle.
39
+ *
40
+ * @template T The tuple type of all promise results
41
+ * @param {readonly [...{ [K in keyof T]: Promise<T[K]> }]} promises - Array of promises to execute
42
+ * @returns {Promise<[(string | undefined)[], { [K in keyof T]: T[K] | undefined }]>}
43
+ * A tuple where the first element is an array of errors (or undefined) and
44
+ * the second element is an array of results (or undefined)
45
+ *
46
+ * @example
47
+ * const [errors, results] = await goTryAll([
48
+ * fetchUser(1),
49
+ * fetchUser(2),
50
+ * fetchUser(3)
51
+ * ])
52
+ *
53
+ * // errors: (string | undefined)[]
54
+ * // results: (User | undefined)[]
55
+ */
56
+ declare function goTryAll<T extends readonly unknown[]>(promises: {
57
+ [K in keyof T]: Promise<T[K]>;
58
+ }): Promise<[(string | undefined)[], {
59
+ [K in keyof T]: T[K] | undefined;
60
+ }]>;
61
+ /**
62
+ * Similar to goTryAll, but returns the raw Error objects instead of just error messages.
63
+ *
64
+ * @template T The tuple type of all promise results
65
+ * @param {readonly [...{ [K in keyof T]: Promise<T[K]> }]} promises - Array of promises to execute
66
+ * @returns {Promise<[(Error | undefined)[], { [K in keyof T]: T[K] | undefined }]>}
67
+ * A tuple where the first element is an array of Error objects (or undefined) and
68
+ * the second element is an array of results (or undefined)
69
+ */
70
+ declare function goTrySettled<T extends readonly unknown[]>(promises: {
71
+ [K in keyof T]: Promise<T[K]>;
72
+ }): Promise<[(Error | undefined)[], {
73
+ [K in keyof T]: T[K] | undefined;
74
+ }]>;
9
75
  /**
10
76
  * Executes a function, promise, or value and returns a Result type.
11
77
  * If an error occurs, it returns a Failure with the error message as a string.
@@ -26,6 +92,8 @@ declare function failure<E>(error: E): Failure<E>;
26
92
  * // With a promise
27
93
  * const [err, result] = await goTry(fetch('https://api.example.com/data'));
28
94
  */
95
+ declare function goTry<T>(fn: () => never): Result<string, never>;
96
+ declare function goTry<T>(fn: () => Promise<T>): Promise<Result<string, T>>;
29
97
  declare function goTry<T>(promise: Promise<T>): Promise<Result<string, T>>;
30
98
  declare function goTry<T>(fn: () => T): Result<string, T>;
31
99
  declare function goTry<T>(value: T): Result<string, T>;
@@ -50,8 +118,12 @@ declare function goTry<T>(value: T): Result<string, T>;
50
118
  * // With a promise
51
119
  * const [err, result] = await goTryRaw(fetch('https://api.example.com/data'));
52
120
  */
121
+ declare function goTryRaw<T, E = Error>(fn: () => never): Result<E, never>;
122
+ declare function goTryRaw<T, E = Error>(fn: () => Promise<T>): Promise<Result<E, T>>;
53
123
  declare function goTryRaw<T, E = Error>(promise: Promise<T>): Promise<Result<E, T>>;
54
124
  declare function goTryRaw<T, E = Error>(fn: () => T): Result<E, T>;
55
125
  declare function goTryRaw<T, E = Error>(value: T): Result<E, T>;
56
126
 
57
- export { type Failure, type MaybePromise, type Result, type Success, failure, goTry, goTryRaw, isFailure, isSuccess, success };
127
+ export { failure, goTry, goTryAll, goTryOr, goTryRaw, goTrySettled, isFailure, isSuccess, success };
128
+ export type { Failure, MaybePromise, Result, ResultWithDefault, Success };
129
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sources":["../src/index.ts"],"mappings":"KAAY,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;KACpC,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;KACpC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;KAEtC,iBAAiB,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC,CAAA;KAErD,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;iBAE5B,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;iBACe,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAE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