샘플
nanostores 1.5.0: Handle nanostores 1.5 equality semantics via Object.is and eq/eqKey, error containment in notification queues, effect lifecycle, reverse onSet middleware pipelines, and batched debouncing across version boundaries
검증된 샘플 — npm nanostores 1.5.0: Handle nanostores 1.5 equality semantics via Object.is and eq/eqKey, error containment in notification queues, effect…
sha256:434dd87ea4af4506d9ea658ce329d308c7228e52b17b4c3cc5124ebc6b94639d
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 2
- 빌드한 서명 키
- 2
선언된 환경
node linux x64 node node npm
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1 |
2026-08-16 |
| node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1 |
2026-08-18 |
케이스
HOW- 목표
- Handle nanostores 1.5 equality semantics via Object.is and eq/eqKey, error containment in notification queues, effect lifecycle, reverse onSet middleware pipelines, and batched debouncing across version boundaries
- 패키지
- 심벌
-
- nanostores.atom
- nanostores.map
- nanostores.computed
- nanostores.batched
- nanostores.effect
- nanostores.onSet
- nanostores.onNotify
- nanostores.onStart
- nanostores.onStop
- nanostores.onMount
- nanostores.listenKeys
- nanostores.subscribeKeys
- nanostores.mapCreator
- nanostores.getKey
- nanostores.setByKey
- nanostores.setPath
- nanostores.cleanStores
- nanostores.STORE_UNMOUNT_DELAY
- Store.eq
- Store.eqKey
- Store.listen
- Store.subscribe
- Store.set
- Store.setKey
- Store.get
- Store.value
- Store.lc
- 환경
- node
- 생성일
- 2026-08-16T06:22:11Z
컨트랙트
- assert setting NaN on an atom holding NaN is a no-op under Object.is and triggers zero notifications, whereas strict inequality (!==) in earlier versions triggered notifications
- assert setting -0 on an atom holding 0 notifies listeners because Object.is(0, -0) is false, whereas strict equality (===) treated them as identical
- assert overriding $atom.eq allows custom equality functions to suppress listener notifications and keep previous object references when values are semantically identical
- assert map.eqKey compares existing and incoming field values with Object.is(prev, next, key), skipping object cloning and listener notification when values match
- assert an uncaught error thrown inside one listener during notify does not abort the notification loop: all subsequent listeners in the queue still execute before the error is rethrown
- assert effect runs immediately upon registration with unpacked positional arguments, mounts all passed stores by incrementing their listener counts, and executes cleanup functions before re-runs and on disposal
- assert onSet interceptors execute in reverse registration order (reduceRight) and pass a mutable shared context across interceptors
- assert calling abort() inside an onSet interceptor halts the mutation before store value update and notifies zero listeners
- assert onNotify interceptors can abort listener notifications while keeping the store value update intact
- assert onStart fires synchronously upon first subscription, onStop fires synchronously upon the last unbind, whereas onMount unmount cleanup is deferred by STORE_UNMOUNT_DELAY (1000ms)
- assert batched defers recomputations across rapid dependency updates via timer debouncing while computed recalculates synchronously on every change, and reading batched with .get() synchronously flushes the calculation
- assert subscribeKeys immediately primes the listener with current store value whereas listenKeys only fires on subsequent mutations, and listenKeys matches nested prefix keys upon dotted path updates
- assert mapCreator returns cached singleton stores by id while active and automatically evicts cached instances once unmounted after STORE_UNMOUNT_DELAY
- assert setPath and setByKey are immutable data transformation utilities that return cloned objects without mutating the original source, while getKey safely traverses nested paths from store state
- assert cleanStores resets store state in development mode and unmounts active stores synchronously
파일
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/stores.mjs
- test/contract.mjs