MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / of

Method of

src/effected.ts:394–396  ·  view source on GitHub ↗

* Create an Effected instance that just returns the value. * @param value The value to return. * @returns * * @since 0.1.2

(value: R)

Source from the content-addressed store, hash-verified

392 * @since 0.1.2
393 */
394 static of<R>(value: R): Effected<never, R> {
395 return effected(() => ({ next: () => ({ done: true, value }) })) as Effected<never, R>;
396 }
397
398 /**
399 * Create an {@link Effected} instance that just returns the value from a getter.

Callers 15

effected.proof.tsFile · 0.80
[Symbol.iterator]Function · 0.80
effected.spec.tsFile · 0.80
[Symbol.iterator]Function · 0.80
fetchUserFunction · 0.80
fetchUserPostsFunction · 0.80
fetchUserSettingsFunction · 0.80
fib2Function · 0.80
fib4Function · 0.80
fetchUserFunction · 0.80
fetchUserPostsFunction · 0.80

Calls 1

effectedFunction · 0.85

Tested by 6

[Symbol.iterator]Function · 0.64
fetchUserFunction · 0.64
fetchUserPostsFunction · 0.64
fetchUserSettingsFunction · 0.64
fib2Function · 0.64
fib4Function · 0.64