0.0.2 • Published 1 year ago

freaky v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

freaky

URL

Basic setup

Install freaky through npm or yarn

npm i freaky
const freaky = require('freaky')

Handling URL

Checking the URL status and redirect the client to another URL if necessary.

Example:

  // You can use this module by calling the freaky function,
  // passing the link's URL and the redirect URL as arguments.

  freaky.checkLink('https://example.com/nonexistent-page', 'https://example.com/404-page');

  freaky.checkLinkOnBeforeUnload('https://example.com/nonexistent-page', 'https://example.com/404-page');

  freaky.checkLinkOnPopState('https://example.com/nonexistent-page', 'https://example.com/404-page');