2.0.1 • Published 11 months ago

ajanuw-event-mutex v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

event mutex

import { EventMutex } from 'ajanuw-event-mutex';

const m = new EventMutex((e) => {
  console.log(e);
});
document.querySelector("#btn").addEventListener("click", () => m.listener());

vue

<template>
  <button type="button" @click="submitMutex.listener($event)">CLICK</button>
  <button type="button" @click="submitMutex.unlock()">UNLOCK</button>
  <view> {{ submitMutex.isLock }} </view>
</template>

<script setup>
import { reactive } from "vue"
import { EventMutex } from 'ajanuw-event-mutex';

const submitMutex = reactive(new EventMutex((e) => {
  console.log(e);
}, false));
</script>

build

$ npm run build
2.0.1

11 months ago

2.0.0

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago