sketch-module-invariant

0.0.3 • Public • Published

Sketch Module Invariant

A sketch module to handle truthys; similar to Facebook's invariant.

Usage

import invariant from 'sketch-module-invariant'

// No errors
invariant(someTruthyVal, { message: 'This will not throw'})

// This will throw an error with this message
invariant(someFalseyVal, { title: 'This will throw an error with this message.', message: 'Nothing to sync!', button: 'Okay' })

Options

Options = { } Type Description
title string The title of the alert.
message string The message of the alert.
button string The button label of the alert.

Installation

npm

npm --save-dev sketch-module-invariant

yarn

yarn add --dev sketch-module-invariant

Readme

Keywords

none

Package Sidebar

Install

npm i sketch-module-invariant

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • buames