Skip to content

Commit

Permalink
🐛 The initial should also force cache=true
Browse files Browse the repository at this point in the history
  • Loading branch information
jaandrle committed Jan 9, 2023
1 parent caac89d commit 6d1083a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 24 deletions.
42 changes: 21 additions & 21 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fpubsub - v0.9.4
fpubsub - v0.9.5

# fpubsub - v0.9.4
# fpubsub - v0.9.5

## Table of contents

Expand Down Expand Up @@ -77,7 +77,7 @@ publish(onexample, "Test");

#### Defined in

[lib/esm.d.ts:61](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L61)
[lib/esm.d.ts:61](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L61)

___

Expand Down Expand Up @@ -115,7 +115,7 @@ FYI: [Fetch: Abort](https://javascript.info/fetch-abort)

#### Defined in

[lib/esm.d.ts:74](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L74)
[lib/esm.d.ts:74](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L74)

**topicFrom**<`DATA`, `DATA_IN`\>(`candidate`): [`Topic`](README.md#topic-1)<`DATA`, `DATA_IN`\>

Expand Down Expand Up @@ -147,7 +147,7 @@ publish(onsubtopic, "For only `onsubtopic` listeners");

#### Defined in

[lib/esm.d.ts:85](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L85)
[lib/esm.d.ts:85](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L85)

___

Expand Down Expand Up @@ -182,7 +182,7 @@ console.log(

#### Defined in

[lib/esm.d.ts:96](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L96)
[lib/esm.d.ts:96](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L96)

___

Expand Down Expand Up @@ -216,7 +216,7 @@ console.log(valueOf(topic)==="value");

#### Defined in

[lib/esm.d.ts:106](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L106)
[lib/esm.d.ts:106](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L106)

___

Expand Down Expand Up @@ -252,7 +252,7 @@ publish(ontest);// throws error ⇐ no topic

#### Defined in

[lib/esm.d.ts:124](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L124)
[lib/esm.d.ts:124](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L124)

___

Expand Down Expand Up @@ -300,7 +300,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:154](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L154)
[lib/esm.d.ts:154](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L154)

**publish**<`T`\>(`value?`): (`topic`: `T`) => `Promise`<[`ReturnStatus`](README.md#returnstatus)\>

Expand Down Expand Up @@ -340,7 +340,7 @@ publish()(onexample);

#### Defined in

[lib/esm.d.ts:162](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L162)
[lib/esm.d.ts:162](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L162)

___

Expand Down Expand Up @@ -389,7 +389,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:194](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L194)
[lib/esm.d.ts:194](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L194)

**subscribe**<`T`\>(`topic`, `options?`): (`listener`: [`Listener`](README.md#listener)<`T`\>) => [`ReturnStatus`](README.md#returnstatus)

Expand Down Expand Up @@ -430,7 +430,7 @@ subscribe(onexample, { once: true })(console.log);

#### Defined in

[lib/esm.d.ts:202](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L202)
[lib/esm.d.ts:202](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L202)

**subscribe**<`T`\>(`listener`, `options?`): (`topic`: `T`) => [`ReturnStatus`](README.md#returnstatus)

Expand Down Expand Up @@ -471,7 +471,7 @@ subscribe(console.log, { once: true })(onexample);

#### Defined in

[lib/esm.d.ts:210](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L210)
[lib/esm.d.ts:210](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L210)

___

Expand Down Expand Up @@ -512,7 +512,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:225](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L225)
[lib/esm.d.ts:225](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L225)

___

Expand Down Expand Up @@ -552,7 +552,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:237](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L237)
[lib/esm.d.ts:237](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L237)

___

Expand Down Expand Up @@ -585,7 +585,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:249](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L249)
[lib/esm.d.ts:249](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L249)

## Type Aliases

Expand All @@ -612,7 +612,7 @@ Given `topic` is not [Topic](README.md#topic-1)!

#### Defined in

[lib/esm.d.ts:1](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L1)
[lib/esm.d.ts:1](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L1)

___

Expand All @@ -632,7 +632,7 @@ For using in JSDoc, you can use global type fpubsubTopic.

#### Defined in

[lib/esm.d.ts:22](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L22)
[lib/esm.d.ts:22](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L22)

___

Expand All @@ -649,7 +649,7 @@ Return type of functions:

#### Defined in

[lib/esm.d.ts:134](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L134)
[lib/esm.d.ts:134](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L134)

___

Expand All @@ -667,7 +667,7 @@ Follows [EventTarget.addEventListener() - Web APIs | MDN](https://developer.mozi

#### Defined in

[lib/esm.d.ts:166](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L166)
[lib/esm.d.ts:166](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L166)

___

Expand All @@ -684,7 +684,7 @@ ___

#### Defined in

[lib/esm.d.ts:170](https://github.com/jaandrle/fpubsub/blob/aa51db5/lib/esm.d.ts#L170)
[lib/esm.d.ts:170](https://github.com/jaandrle/fpubsub/blob/caac89d/lib/esm.d.ts#L170)

## References

Expand Down
1 change: 1 addition & 0 deletions lib/cjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
if(Reflect.has(topic, "initial")){
storage_data.value= topic.initial;
Reflect.deleteProperty(topic, "initial");
topic.cache= true;
}
return Object.freeze(topic);
}
Expand Down
1 change: 1 addition & 0 deletions lib/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function topic(options){
if(Reflect.has(topic, "initial")){
storage_data.value= topic.initial;
Reflect.deleteProperty(topic, "initial");
topic.cache= true;
}
return Object.freeze(topic);
}
Expand Down
1 change: 1 addition & 0 deletions lib/fpubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
if(Reflect.has(topic, "initial")){
storage_data.value= topic.initial;
Reflect.deleteProperty(topic, "initial");
topic.cache= true;
}
return Object.freeze(topic);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fpubsub",
"version": "0.9.4",
"version": "0.9.5",
"description": "PubSub pattern library with types support",
"keywords": [
"event",
Expand Down

0 comments on commit 6d1083a

Please sign in to comment.