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

1.0.3 • Public • Published

guardily

Helper method that guards function parameters

description

Exports a Guard helper method:

install

yarn add guardily npm install guardily

usage

ts:

import { Guard } from "guardily";

// don't throw exception, use a custom callback
const testFunc = x => {
  Guard.argumentNotValid(
    x,
    "x",
    { doNotThrow: true, useCallback: true },
    null,
    () => {
      console.log("argument is not valid");
    }
  );
};

Readme

Keywords

Package Sidebar

Install

npm i guardily

Weekly Downloads

0

Version

1.0.3

License

GPL-3.0

Unpacked Size

74.5 kB

Total Files

39

Last publish

Collaborators

  • andreilucaci