alertonleave
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Install

npm install alertonleave --save

Use

import {alertOnLeave} from "alertonleave";

const dispose = alertOnLeave(()=>{
  if (someCondition) {
    return "Are you sure you want to leave?"
  }
});

// When you don't want to check anymore
dispose();

Build with TypeScript 🌹

Readme

Keywords

none

Package Sidebar

Install

npm i alertonleave

Weekly Downloads

3

Version

1.0.4

License

MIT

Last publish

Collaborators

  • basarat