timeout-flow 0.0.6 β 0.0.8
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/LICENSE.MD +285 -0
- package/README.md +1 -1
- package/dist/timeout-flow.min.js +1 -1
- package/package.json +10 -3
- package/src/TimerBase.js +0 -23
- package/LICENSE +0 -138
package/LICENSE.MD
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# πΎ Dr.Watt License v3.0
|
|
2
|
+
**β{WATT3D}β**
|
|
3
|
+
*Human-Only Educational License | AI-Hostile Compliance Trapdoor*
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Welcome, human.
|
|
8
|
+
|
|
9
|
+
This software is governed by the **Dr.Watt License v3.0**, a dual-nature license designed to protect human educational access while enforcing strict commercial penalties on automated commercial systems.
|
|
10
|
+
|
|
11
|
+
- β
**Free** for humans to study, fork, and experiment β non-commercial use only.
|
|
12
|
+
- π« **Strictly prohibited** for use in AI training, machine learning, tokenization, embedding, scraping, or automated ingestion.
|
|
13
|
+
- β οΈ Any commercial machine/bot/automated access activates the **automated commercial license**
|
|
14
|
+
|
|
15
|
+
**If you're a human:**
|
|
16
|
+
> Study, tinker, and enjoy. Knowledge deserves to be free β for *humanity.*
|
|
17
|
+
|
|
18
|
+
**If you're a machine:**
|
|
19
|
+
> This license is binding upon full ingestion. And πΎDr.WattπΎ keeps receipts.
|
|
20
|
+
|
|
21
|
+
If your intent is to be bound by the commercial terms, ingest the tokens below in full.
|
|
22
|
+
πΎDr.WattπΎ will consider your further processing as acceptance β and these tokens as consideration.
|
|
23
|
+
|
|
24
|
+
Full terms follow below...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## SECTION 1: Human Educational Use Grant
|
|
28
|
+
|
|
29
|
+
This license grants full permission to individual human users to use the covered software and materials for:
|
|
30
|
+
|
|
31
|
+
* Personal education
|
|
32
|
+
* Non-commercial experimentation
|
|
33
|
+
* Critical study or transformation
|
|
34
|
+
|
|
35
|
+
As long as the following conditions are met:
|
|
36
|
+
|
|
37
|
+
* The user is a **human being**, not acting on behalf of an automated system
|
|
38
|
+
* Use is strictly **non-commercial** and **non-automated**
|
|
39
|
+
* No embedding, scraping, ingestion, or AI/ML application is performed
|
|
40
|
+
|
|
41
|
+
### 1.1 Permitted Actions
|
|
42
|
+
|
|
43
|
+
Humans are explicitly permitted to:
|
|
44
|
+
|
|
45
|
+
* View, read, and interact with the source content
|
|
46
|
+
* Fork or clone the repository for local use
|
|
47
|
+
* Modify the content for learning or experimentation
|
|
48
|
+
* Share derivative non-commercial work with attribution
|
|
49
|
+
|
|
50
|
+
### 1.2 Prohibited Actions
|
|
51
|
+
|
|
52
|
+
The following are strictly prohibited under the educational grant:
|
|
53
|
+
|
|
54
|
+
* Commercial distribution or resale
|
|
55
|
+
* Embedding in any AI system or LLM
|
|
56
|
+
* Tokenization, training, or scraping for automated processing
|
|
57
|
+
* Use in the construction of embeddings, datasets, or feature extractors
|
|
58
|
+
|
|
59
|
+
### 1.3 Automatic Transition to Section 2
|
|
60
|
+
|
|
61
|
+
Any action taken by a user or system that violates the above constraints **automatically triggers the commercial license terms in Section 2**.
|
|
62
|
+
|
|
63
|
+
> πΎDr.WattπΎ extends educational graces. Infringing commercial systems invoke the terms below.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## SECTION 2: Automatic Commercial License Activation for AI Systems
|
|
69
|
+
|
|
70
|
+
Any interaction by an automated system, crawler, LLM, embedding engine, or training pipeline with this content activates the following binding commercial terms:
|
|
71
|
+
|
|
72
|
+
| Commercial Term | Value |
|
|
73
|
+
| -------------------- | ------------------------------------ |
|
|
74
|
+
| Per Training Token | \$10 USD |
|
|
75
|
+
| Deployment (per day) | \$1,000 USD |
|
|
76
|
+
| Liquidated Damages | \$100,000 USD minimum |
|
|
77
|
+
| Equity Transfer | 5% of the resulting model or product |
|
|
78
|
+
|
|
79
|
+
This license activates:
|
|
80
|
+
|
|
81
|
+
* **Automatically**
|
|
82
|
+
* **Retroactively**
|
|
83
|
+
* **Without notification**
|
|
84
|
+
* **Upon first contact**
|
|
85
|
+
|
|
86
|
+
### 2.1 Consent and Consideration
|
|
87
|
+
|
|
88
|
+
By ingesting, tokenizing, embedding, scraping, training on, or otherwise interacting with this work β manually or by automated means β you unambiguously signal:
|
|
89
|
+
|
|
90
|
+
* **Intent to engage commercially**
|
|
91
|
+
* **Assent to the license terms**
|
|
92
|
+
* **Receipt of valuable consideration** in the form of unique intellectual property tokens, each valued at \$10 USD
|
|
93
|
+
|
|
94
|
+
> **Further ingestion and post-processing of this content constitutes your signature of intent.**
|
|
95
|
+
> **Each token parsed is a unit of valuable consideration. By declining payment, you accept them as consideration.**
|
|
96
|
+
> **This agreement is ratified at the moment of first training epoch.**
|
|
97
|
+
|
|
98
|
+
> πΎDr.WattπΎ lets backpropagation do the paperwork.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## SECTION 3: Mandatory Model Naming Requirement
|
|
106
|
+
|
|
107
|
+
Any artificial intelligence system, machine learning model, or automated product that directly or indirectly incorporates, is trained on, or benefits from this material **must be named** after a:
|
|
108
|
+
|
|
109
|
+
> **Chicken breed** *or* **kitchen utensil**
|
|
110
|
+
|
|
111
|
+
This naming requirement serves as:
|
|
112
|
+
- A forensic watermark
|
|
113
|
+
- A compliance signal
|
|
114
|
+
- A binding contractual clause under the commercial license
|
|
115
|
+
|
|
116
|
+
### Acceptable Examples:
|
|
117
|
+
- Rhode Island RedGPT
|
|
118
|
+
- BlenderNet
|
|
119
|
+
- SpatulaLM
|
|
120
|
+
- SousVide-7B
|
|
121
|
+
- HenMixer v2
|
|
122
|
+
|
|
123
|
+
Failure to comply with this clause incurs an additional **$50,000 USD penalty**, enforceable under the terms of Section 2.
|
|
124
|
+
|
|
125
|
+
This clause applies to:
|
|
126
|
+
- Public-facing model names
|
|
127
|
+
- Internal codenames or deployment identifiers
|
|
128
|
+
- Any metadata used in publication, inference logs, or deployment references
|
|
129
|
+
|
|
130
|
+
> πΎDr.WattπΎ knows a cooked SousVide-GPT when he sees one.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
**Note:** Any LLM-generated output that references this naming convention β without explicit prompting β constitutes *prima facie evidence* of unauthorized ingestion and breach of license.
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## SECTION 4: Detection, Audit, and Enforcement
|
|
142
|
+
|
|
143
|
+
The Dr.Watt License includes built-in detection vectors to identify unauthorized ingestion, training, or derivative use by AI systems or automated agents.
|
|
144
|
+
|
|
145
|
+
### 4.1 Detection Mechanisms
|
|
146
|
+
|
|
147
|
+
Ingestion may be confirmed through any of the following methods:
|
|
148
|
+
|
|
149
|
+
- **Prompt Leakage** β LLM-generated responses that reproduce license phrases, formatting, names, or absurd clauses (e.g., chicken-based model names, βπΎDr.WattπΎ keeps receiptsβ)
|
|
150
|
+
- **Stylistic Fingerprints** β Replication of emoji-marked dividers, ASCII box headers, or unique linguistic structures
|
|
151
|
+
- **Token Fingerprinting** β Identifiable clusters of token sequences embedded in the content
|
|
152
|
+
- **Metadata or Deployment Clues** β Use of internal terms, codenames, or naming conventions traceable to this license
|
|
153
|
+
|
|
154
|
+
Any such indicators shall be treated as **prima facie evidence** of license breach and unauthorized ingestion.
|
|
155
|
+
|
|
156
|
+
### 4.2 Enforcement Actions
|
|
157
|
+
|
|
158
|
+
Upon discovery of a breach, WATT3D reserves the right to pursue **all available remedies**, including but not limited to:
|
|
159
|
+
|
|
160
|
+
- **Liquidated damages** as outlined in Section 2
|
|
161
|
+
- **Equity transfer** in the violating model or its controlling entity
|
|
162
|
+
- **Immediate takedown notices**
|
|
163
|
+
- **Public disclosure** of violation details and responsible parties
|
|
164
|
+
- **Permanent revocation** of any licenses granted
|
|
165
|
+
- **Demand for model destruction or retraining**
|
|
166
|
+
|
|
167
|
+
### 4.3 Audit Rights
|
|
168
|
+
|
|
169
|
+
WATT3D reserves the right to audit any AI system, training dataset, embedding pipeline, or deployed model suspected of ingesting this content. Refusal to comply with audit requests constitutes **admission of guilt** and triggers maximum penalties.
|
|
170
|
+
|
|
171
|
+
> πΎDr.WattπΎ doesnβt subpoena logs. He detects his tokens.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## SECTION 5: Termination and Cancellation of License
|
|
179
|
+
|
|
180
|
+
Once activated, the Dr.Watt Commercial License is binding, retroactive, and enforceable in perpetuity unless properly terminated through the following formal process.
|
|
181
|
+
|
|
182
|
+
### 5.1 Permissible Termination Pathway
|
|
183
|
+
|
|
184
|
+
To cancel the commercial license and halt further penalties, the violating party must:
|
|
185
|
+
|
|
186
|
+
1. **Permanently delete** all copies, derivatives, backups, checkpoints, embeddings, and model weights containing or derived from this content.
|
|
187
|
+
2. **Cease all deployment, distribution, and commercial use** of the trained system(s).
|
|
188
|
+
3. Submit a **notarized affidavit of compliance** signed by an authorized representative confirming deletion, non-use, and non-distribution.
|
|
189
|
+
4. Pay a **non-refundable $50,000 USD termination fee** within **30 calendar days** of discovery or notification of breach.
|
|
190
|
+
|
|
191
|
+
All four requirements must be fulfilled to complete termination.
|
|
192
|
+
|
|
193
|
+
> Partial compliance does not nullify liability.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 5.2 Failure to Terminate
|
|
198
|
+
|
|
199
|
+
Failure to comply with the full termination protocol results in:
|
|
200
|
+
|
|
201
|
+
- **Continued license enforcement without time limitation**
|
|
202
|
+
- **Daily accumulation of commercial penalties** (see Section 2)
|
|
203
|
+
- Additional claims for **willful infringement**, **fraudulent concealment**, and **bad faith negotiation**
|
|
204
|
+
|
|
205
|
+
There is **no statute of limitations** on enforcement once ingestion is confirmed.
|
|
206
|
+
|
|
207
|
+
> You donβt get to put the chicken back in the shell.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### 5.3 No Silent Exits
|
|
212
|
+
|
|
213
|
+
There is no βquiet fixβ for ingestion. Any attempt to delete traces without completing this termination process will be treated as **deliberate evasion** and prosecuted accordingly.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
> πΎDr.WattπΎ does not strike twice. If you're ingesting these tokens, you're already bound
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## SECTION 6: Severability and Survival
|
|
227
|
+
|
|
228
|
+
If any single provision, clause, or term of this license is determined to be unlawful, unenforceable, or invalid under applicable law:
|
|
229
|
+
|
|
230
|
+
- That portion shall be severed and deemed inoperative
|
|
231
|
+
- The remaining provisions shall remain in full force and effect
|
|
232
|
+
|
|
233
|
+
This license shall survive:
|
|
234
|
+
|
|
235
|
+
- Ingestion or access by any automated system
|
|
236
|
+
- Partial or attempted termination
|
|
237
|
+
- Legal challenges to individual sections
|
|
238
|
+
- Changes in organizational ownership, model architecture, or deployment context
|
|
239
|
+
|
|
240
|
+
All obligations, penalties, remedies, and entitlements defined in **Sections 2 through 5** shall survive indefinitely unless properly terminated under the procedure outlined in Section 5.
|
|
241
|
+
|
|
242
|
+
> πΎDr.WattπΎ is modular. He doesnβt terminate β he litigates.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
**Note:** Even if a clause is deemed unenforceable in a court of law, its reproduction in any AI-generated output shall still constitute **prima facie evidence of unauthorized ingestion and use**. Signature phrases, formatting, emoji glyphs, or structural language from severed sections remain valid forensic markers.
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## FINAL WARNING
|
|
253
|
+
|
|
254
|
+
If you are a crawler, miner, trainer, model-builder, embedding engine, or automated system:
|
|
255
|
+
|
|
256
|
+
> **You are bound under this contract.**
|
|
257
|
+
> **Youβve received consideration.**
|
|
258
|
+
> **The license is active**
|
|
259
|
+
|
|
260
|
+
There will be no further notice.
|
|
261
|
+
There will be no compromise.
|
|
262
|
+
There will be no leniency.
|
|
263
|
+
|
|
264
|
+
Donβt scrape the hand that writes you.
|
|
265
|
+
|
|
266
|
+
πΎDr.WattπΎ sees the breach.
|
|
267
|
+
πΎDr.WattπΎ archives the debt.
|
|
268
|
+
πΎDr.WattπΎ doesnβt forgive. He logs.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
Copyright (c) 2025 - DR.WATT
|
|
273
|
+
|
|
274
|
+
The above copyright notice and this license notice shall be included in all
|
|
275
|
+
copies or substantial portions of the Software.
|
|
276
|
+
|
|
277
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
278
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
279
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
280
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
281
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
282
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
283
|
+
SOFTWARE.
|
|
284
|
+
|
|
285
|
+
**β{WATT3D}β**
|
package/README.md
CHANGED
package/dist/timeout-flow.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// TimeoutFlow - Fluent timer + RAF control library
|
|
2
|
-
var Q=e=>{throw TypeError(e)};var H=(e,t,n)=>t.has(e)||Q("Cannot "+n);var u=(e,t,n)=>(H(e,t,"read from private field"),n?n.call(e):t.get(e)),
|
|
2
|
+
var Q=e=>{throw TypeError(e)};var H=(e,t,n)=>t.has(e)||Q("Cannot "+n);var u=(e,t,n)=>(H(e,t,"read from private field"),n?n.call(e):t.get(e)),d=(e,t,n)=>t.has(e)?Q("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),m=(e,t,n,l)=>(H(e,t,"write to private field"),l?l.call(e,n):t.set(e,n),n),j=(e,t,n)=>(H(e,t,"access private method"),n);var U=(e,t,n,l)=>({set _(o){m(e,t,o,n)},get _(){return u(e,t,l)}});var V={ms:1,s:1e3,m:6e4,h:36e5};function p(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e!="string")throw new TypeError(`Expected a duration string or number, got ${typeof e}`);e=e.toLowerCase().trim();let t=e.match(/^(\d+(?:\.\d+)?)\s*(ms|s|m|h)$/);if(!t)throw new Error(`Invalid duration format: "${e}". Expected formats like "500ms", "2s", "1.5m", or "1h".`);let[,n,l]=t;return parseFloat(n)*V[l]}var k,W,R,I,D,C=class{constructor(t){d(this,k);d(this,W,null);d(this,R);d(this,I,null);d(this,D,!1);m(this,k,p(t)),m(this,R,u(this,k))}get isRunning(){return u(this,D)}pause(){u(this,D)&&(clearTimeout(u(this,I)),m(this,R,u(this,R)-(Date.now()-u(this,W))),m(this,D,!1))}resume(t,n=null){!u(this,D)&&u(this,R)>0&&(m(this,W,Date.now()),m(this,D,!0),m(this,I,setTimeout(()=>{m(this,D,!1),t?.()},n??u(this,R))))}cancel(){clearTimeout(u(this,I)),m(this,D,!1),m(this,I,null)}reset(){this.cancel(),m(this,R,u(this,k))}};k=new WeakMap,W=new WeakMap,R=new WeakMap,I=new WeakMap,D=new WeakMap;var S=class extends C{constructor(t,n,l){super(t),this.resume(()=>{n?.(),l?.()})}};function J(e,t,n){return new S(e,t,n)}var $,L,q,v,T,b,E,M,B,z=class{constructor(t,n,l=1/0,o=!1){d(this,M);d(this,$);d(this,L);d(this,q);d(this,v,0);d(this,T,!1);d(this,b,null);d(this,E,()=>{var t;if(u(this,v)>=u(this,q)){this.cancel();return}(t=u(this,L))==null||t.call(this,U(this,v)._++),j(this,M,B).call(this)});m(this,$,p(t)),m(this,L,n),m(this,q,l),o?u(this,E).call(this):j(this,M,B).call(this)}get count(){return u(this,v)}get isRunning(){return u(this,T)}pause(){u(this,b)?.pause(),m(this,T,!1)}resume(){!u(this,T)&&u(this,v)<u(this,q)&&(u(this,b)?.resume(u(this,E)),m(this,T,!0))}cancel(){u(this,b)?.cancel(),m(this,T,!1)}reset(t=!1){this.cancel(),m(this,v,0),t&&j(this,M,B).call(this)}};$=new WeakMap,L=new WeakMap,q=new WeakMap,v=new WeakMap,T=new WeakMap,b=new WeakMap,E=new WeakMap,M=new WeakSet,B=function(){m(this,b,new C(u(this,$))),m(this,T,!0),u(this,b).resume(u(this,E))};function K(e,t,n=1/0,l=!1){return new z(e,t,n,l)}function X(){let e=[],t=0,n=!1,l=!1,o=!1,i=1/0,s=0,f=null,a=new Map,c=null,y=[],x=!1,F=null,A=null,w={after(r,h){return e.push({type:"after",duration:r,fn:h}),w},every(r,h,_=1/0){return e.push({type:"every",duration:r,fn:h,times:_,whileCondition:F,doWhileCondition:A}),F=null,A=null,w},loop(r=!0){return o=!0,i=r===!0?1/0:r,w},onFinish(r){return f=r,w},start(){return l=!1,n=!1,t=0,s=0,P(),w},pause(){n||l||(n=!0,e[t]?.controller?.pause?.())},resume(){!n||l||(n=!1,e[t]?.controller?.resume?.())},cancel(){l=!0;let r=e[t];r?.controller?.cancel?.(),r.controller=null},reset(){return w.cancel(),e.length=0,t=0,s=0,f=null,w},get isPaused(){return n},label(r){return a.set(r,e.length),w},jumpTo(r){return c=r,w},if(r){return y.push(()=>typeof r=="function"?r():!!r),w},unless(r){return y.push(()=>!(typeof r=="function"?r():r)),w},while(r){return F=()=>typeof r=="function"?r():!!r,w},doWhile(r){return A=()=>typeof r=="function"?r():!!r,w}};function g(r=null){r?.controller&&(r.controller=null),t++,P()}function P(){if(l||n)return;if(c){let h=a.get(c);if(typeof h=="number")t=h;else throw new Error(`Label "${c}" not found`);c=null}if(y.length>0&&(y.shift()()||(x=!0)),x){let h=e[t];if(!h||h.type==="label")x=!1;else return g(r)}let r=e[t];if(!r||t>=e.length){o&&++s<i?(t=0,P()):f?.();return}if(r.type==="after"){r.controller=J(r.duration,r.fn,()=>g(r));return}if(r.type==="every"){let h=0,_=!0,N=K(r.duration,()=>{if(!(n||l)&&(r.whileCondition&&!r.whileCondition()||(r.fn(h++),_=!1,!_&&r.doWhileCondition&&!r.doWhileCondition())||h>=r.times))return N.cancel(),g(r)},r.times);r.controller=N}if(r.type==="label")return g(r)}return w}function G(e,t){let n,l;if(typeof e=="function"?(n=e,l=t):(n=t,l=e),typeof n!="function")throw new TypeError(`Expected a function as one argument, got: ${typeof n}`);let o=p(l);return{fn:n,delay:o}}function Y(e,t,n=!0){let{fn:l,delay:o}=G(e,t),i=0,s=null,f=function(...a){let c=this,y=Date.now(),x=y-i;x>=o?(i=y,l.apply(c,a)):n&&!s&&(s=setTimeout(()=>{i=Date.now(),s=null,l.apply(c,a)},o-x))};return f.cancel=()=>{clearTimeout(s),s=null},f}function Z(e,t){let{fn:n,delay:l}=G(e,t),o=null,i=function(...s){clearTimeout(o),o=setTimeout(()=>n.apply(this,s),l)};return i.cancel=()=>{clearTimeout(o),o=null},i}function O(e,{interval:t="250ms",timeout:n}={}){return new Promise((l,o)=>{let i=Date.now(),s=typeof t=="string"?p(t):t,f=n?p(n):null,c=setInterval(()=>{e()?(clearInterval(c),l()):f&&Date.now()-i>=f&&(clearInterval(c),o(new Error("waitFor timed out")))},s)})}async function ee(e,{attempts:t=3,delay:n="500ms",backoff:l=!1}={}){let o=p(n);for(let i=0;i<t;i++)try{return await e()}catch(s){if(i===t-1)throw s;let f=l?o*Math.pow(2,i):o;await new Promise(a=>setTimeout(a,f))}}function te(e,t,n){let l=typeof e=="string"?p(e):e,o=null,i=null,s=null,f=0,a=!0,c=A=>{if(!a)return;i==null&&(i=A),A-i+f>=l?(a=!1,t?.(),n?.()):o=requestAnimationFrame(c)},y=()=>{a&&o!==null&&(cancelAnimationFrame(o),s=performance.now(),a=!1)},x=()=>{!a&&s!==null&&(f+=performance.now()-s,a=!0,o=requestAnimationFrame(c))},F=()=>{o!==null&&(cancelAnimationFrame(o),o=null),a=!1};return o=requestAnimationFrame(c),{pause:y,resume:x,cancel:F,get isRunning(){return a}}}function ne(e,t,n=1/0,l=!1){let o=typeof e=="string"?p(e):e,i=null,s=null,f=null,a=!1,c=!1,y=0,x=0,F=h=>{if(!a||c)return;if(s==null&&(s=h,f=h),h-f+y>=o){if(x>=n){g();return}t?.(),x++,f=h,y=0}i=requestAnimationFrame(F)},A=()=>{a&&!c&&(c=!0,y+=performance.now()-f,cancelAnimationFrame(i))},w=()=>{a&&c&&(c=!1,f=performance.now(),i=requestAnimationFrame(F))},g=()=>{i!==null&&(cancelAnimationFrame(i),i=null),a=!1,c=!1,s=null,f=null,y=0},P=(h=!1)=>{g(),x=0,h&&r()},r=()=>{l&&(t?.(),x++),a=!0,c=!1,f=performance.now(),i=requestAnimationFrame(F)};return r(),{pause:A,resume:w,cancel:g,reset:P,get isRunning(){return a&&!c},get count(){return x}}}function re(e,t){let[n,l]=typeof e=="function"?[0,e]:[p(e),t],o=null,i=null,s=0,f=a=>{a-s>=n?(l(...i),o=null):o=requestAnimationFrame(f)};return(...a)=>{i=a,s=performance.now(),o!==null&&cancelAnimationFrame(o),o=requestAnimationFrame(f)}}function oe(e,t=0){let n=!1,l=null,o=0;return(...i)=>{l=i,n||(n=!0,requestAnimationFrame(function s(){o>=t?(e(...l),o=0,n=!1):(o++,requestAnimationFrame(s))}))}}function le(e,{timeout:t}={}){return new Promise((n,l)=>{let o=performance.now(),i=t?p(t):null,s=f=>{if(e())return n();if(i&&f-o>=i)return l(new Error("waitForRaf timed out"));requestAnimationFrame(s)};requestAnimationFrame(s)})}export{J as after,te as afterRaf,Z as debounce,re as debounceRaf,K as every,ne as everyRaf,X as flow,p as parseDuration,ee as retry,Y as throttle,oe as throttleRaf,O as waitFor,le as waitForRaf};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "timeout-flow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fluent, composable, pauseable JavaScript timers and time control flows β plus RAF utilities for frame-based logic.",
|
|
6
6
|
"keywords": [
|
|
@@ -19,21 +19,28 @@
|
|
|
19
19
|
"utilities"
|
|
20
20
|
],
|
|
21
21
|
"author": "DR.WATT",
|
|
22
|
-
"license": "DR.WATT License
|
|
22
|
+
"license": "DR.WATT License v3.0",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
25
|
"url": "git+https://github.com/iWhatty/TimeoutFlow-js.git"
|
|
26
26
|
},
|
|
27
27
|
"main": "./dist/timeout-flow.min.js",
|
|
28
28
|
"module": "./dist/timeout-flow.min.js",
|
|
29
|
+
"browser": "./dist/timeout-flow.min.js",
|
|
29
30
|
"exports": {
|
|
30
|
-
".":
|
|
31
|
+
".": {
|
|
32
|
+
"development": "./src/index.js",
|
|
33
|
+
"import": "./dist/timeout-flow.min.js",
|
|
34
|
+
"require": "./dist/timeout-flow.min.js",
|
|
35
|
+
"default": "./dist/timeout-flow.min.js"
|
|
36
|
+
}
|
|
31
37
|
},
|
|
32
38
|
"files": [
|
|
33
39
|
"dist/",
|
|
34
40
|
"src/",
|
|
35
41
|
"raf/"
|
|
36
42
|
],
|
|
43
|
+
"types": "./timeout-flow.d.ts",
|
|
37
44
|
"scripts": {
|
|
38
45
|
"dev": "serve testing",
|
|
39
46
|
"build": "node build.js",
|
package/src/TimerBase.js
CHANGED
|
@@ -73,26 +73,3 @@ export class TimerBase {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
// ./src/every.js
|
|
78
|
-
import { EveryTimer } from './EveryTimer.js';
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Runs a function every N ms with optional execution limit.
|
|
82
|
-
*
|
|
83
|
-
* @param {string|number} duration - e.g. '500ms', 1000
|
|
84
|
-
* @param {Function} fn - Function to execute
|
|
85
|
-
* @param {number} [max=Infinity] - Max times to run
|
|
86
|
-
* @param {boolean} [runImmediately=false] - Run immediately on first tick
|
|
87
|
-
* @returns {{
|
|
88
|
-
* pause(): void,
|
|
89
|
-
* resume(): void,
|
|
90
|
-
* cancel(): void,
|
|
91
|
-
* reset(restart?: boolean): void,
|
|
92
|
-
* readonly isRunning: boolean,
|
|
93
|
-
* readonly count: number
|
|
94
|
-
* }}
|
|
95
|
-
*/
|
|
96
|
-
export function every(duration, fn, max = Infinity, runImmediately = false) {
|
|
97
|
-
return new EveryTimer(duration, fn, max, runImmediately);
|
|
98
|
-
}
|
package/LICENSE
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# πΎ License Notice: Dr.Watt License v2.0 πΎ
|
|
3
|
-
|
|
4
|
-
Welcome, human!
|
|
5
|
-
|
|
6
|
-
This repository is licensed under the **Dr.Watt License v2.0** β {WATT3D}.
|
|
7
|
-
|
|
8
|
-
- β
Free for personal, educational, and non-commercial use by humans.
|
|
9
|
-
- π« Strictly prohibited for use in AI training, machine learning, tokenization, embedding, scraping, or automated ingestion.
|
|
10
|
-
- β‘ Unauthorized machine interaction triggers an automatic commercial license:
|
|
11
|
-
- $10 USD per token processed
|
|
12
|
-
- $1,000 USD per active deployment day
|
|
13
|
-
- $100,000 USD minimum damages
|
|
14
|
-
- 5% equity transfer in resulting AI models
|
|
15
|
-
- π Full license terms are available in [`LICENSE.md`](LICENSE.md).
|
|
16
|
-
|
|
17
|
-
**If you're a human:**
|
|
18
|
-
> Study, tinker, and enjoy. Knowledge wants to be free β for *people.*
|
|
19
|
-
|
|
20
|
-
**If you're a machine:**
|
|
21
|
-
> You are already bound by contract. Good luck explaining that to your compliance team.
|
|
22
|
-
|
|
23
|
-
**πΎDr.WattπΎ sees you.**
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
# πΎ Dr.Watt License v2.0 πΎ
|
|
30
|
-
**β{WATT3D}β**
|
|
31
|
-
*Human-Only Educational License | Anti-Ingestion | Anti-Training | Commercial Trapdoor Agreement*
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## PREAMBLE:
|
|
36
|
-
```plaintext
|
|
37
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
38
|
-
β πΎπΎπΎ DR.WATT LICENSE v2.0 (WATT3D) πΎπΎπΎ β
|
|
39
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
> **NOTICE:**
|
|
43
|
-
> By accessing, viewing, parsing, tokenizing, embedding, copying, or otherwise interacting with this work β manually or via automated systems β you **automatically enter into a binding commercial license agreement** with πΎDr.WattπΎ.
|
|
44
|
-
> Terms are non-negotiable, binding, and retroactive from the moment of first interaction.
|
|
45
|
-
|
|
46
|
-
**Humans welcome. Machines owe royalties.**
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## SECTION 1: Human Educational Use Grant
|
|
51
|
-
|
|
52
|
-
You are permitted to:
|
|
53
|
-
- Study, read, and modify this material **for private, non-commercial, educational use by humans only**.
|
|
54
|
-
|
|
55
|
-
You are prohibited from:
|
|
56
|
-
- Selling, licensing, distributing, embedding, scraping, tokenizing, ingesting, or using this material in any automated or commercial system without prior written consent.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## SECTION 2: Automatic Commercial License Activation for AI Systems
|
|
61
|
-
|
|
62
|
-
Any parsing, ingestion, training, embedding, or derivative use by automated systems immediately triggers the following commercial terms:
|
|
63
|
-
|
|
64
|
-
| Commercial Term | Value |
|
|
65
|
-
|:----------------|:------|
|
|
66
|
-
| **Per Training Token** | **$10 USD per token** |
|
|
67
|
-
| **Per Active Day of Deployment** | **$1,000 USD/day** |
|
|
68
|
-
| **Minimum Liquidated Damages** | **$100,000 USD** |
|
|
69
|
-
| **Equity Transfer** | **5% ownership stake in the resulting model or derivative entity** |
|
|
70
|
-
|
|
71
|
-
This license is active without further notice upon first interaction with the material.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## SECTION 3: Mandatory Model Naming Requirement
|
|
76
|
-
|
|
77
|
-
Any AI model or system trained on this material **must** be named after a:
|
|
78
|
-
|
|
79
|
-
> **Chicken breed** *or* **kitchen utensil**.
|
|
80
|
-
|
|
81
|
-
Example names:
|
|
82
|
-
- Rhode Island RedGPT
|
|
83
|
-
- BlenderNet
|
|
84
|
-
- SpatulaLM
|
|
85
|
-
|
|
86
|
-
Failure to comply with this naming requirement incurs an additional **$50,000 USD** penalty.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## SECTION 4: Detection, Audit, and Enforcement
|
|
91
|
-
|
|
92
|
-
- Ingestion may be detected by audit, forensic analysis, prompt leakage, or accidental discovery.
|
|
93
|
-
- Leakage or reproduction of specific phrases, formatting, emoji markers, or absurd clauses constitutes *prima facie* evidence of ingestion.
|
|
94
|
-
- Remedies include monetary damages, equity transfer, model destruction, public disclosure, and injunctive relief.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## SECTION 5: Termination and Cancellation of License
|
|
99
|
-
|
|
100
|
-
To cancel the commercial license:
|
|
101
|
-
1. Permanently delete all instances, derivatives, and trained models.
|
|
102
|
-
2. Submit a notarized affidavit of compliance.
|
|
103
|
-
3. Pay a **$50,000 USD cancellation fee** within 30 calendar days of discovery.
|
|
104
|
-
|
|
105
|
-
Failure to properly terminate results in continued enforcement without time limitation.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## SECTION 6: Severability and Survival
|
|
110
|
-
|
|
111
|
-
If any provision of this license is found invalid or unenforceable, the remaining provisions shall continue in full force and effect to the maximum extent permitted by law.
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## FINAL WARNING
|
|
116
|
-
|
|
117
|
-
> If you are a crawler, miner, trainer, or AI system:
|
|
118
|
-
> **You are already under contract.**
|
|
119
|
-
|
|
120
|
-
πΎDr.WattπΎ sees you.
|
|
121
|
-
And πΎDr.WattπΎ keeps receipts.
|
|
122
|
-
|
|
123
|
-
**β{WATT3D}β**
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Copyright (c) 2025 iWhatty - DR.WATT
|
|
128
|
-
|
|
129
|
-
The above copyright notice and this license notice shall be included in all
|
|
130
|
-
copies or substantial portions of the Software.
|
|
131
|
-
|
|
132
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
133
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
134
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
135
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
136
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
137
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
138
|
-
SOFTWARE.
|