1.0.0 • Published 1 year ago

mealtime v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

mealtime

npm.io npm.io npm.io npm.io npm.io

abstracted proxy delegation pattern made in typescript

how to use

type Action = () => void

class Event {
	private spiesForSend = new SetHandler<Action>()

	public spyOnSend: WeakSet<Action> = new WeakerSet(this.spiesForSend)

	sendToSpies: Action = new Proxy(() => { }, this.spiesForSend)
}

const event = new Event()

event.spyOnSend.add(() => console.log('Hello, world!'))

event.sendToSpies()

what to import

javascript

import { SetHandler, WeakerSet } from 'https://cdn.skypack.dev/mealtime?min'

node

npm i mealtime
import { SetHandler, WeakerSet } from 'mealtime'

deno

import { SetHandler, WeakerSet } from 'https://cdn.skypack.dev/mealtime?dts'
1.0.0

1 year ago

0.0.42

4 years ago

0.0.40

4 years ago

0.0.41

4 years ago

0.0.39

4 years ago

0.0.32

4 years ago

0.0.33

4 years ago

0.0.34

4 years ago

0.0.35

4 years ago

0.0.36

4 years ago

0.0.31

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.25

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.30

4 years ago

0.0.26

4 years ago

0.0.27

4 years ago

0.0.28

4 years ago

0.0.29

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago