0.0.3 • Published 7 years ago

sketch-module-invariant v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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 = { }TypeDescription
titlestringThe title of the alert.
messagestringThe message of the alert.
buttonstringThe button label of the alert.

Installation

npm

npm --save-dev sketch-module-invariant

yarn

yarn add --dev sketch-module-invariant
0.0.3

7 years ago

0.0.2

7 years ago

0.0.11

7 years ago

0.0.1

7 years ago