4.0.0 • Published 5 years ago

easy-e v4.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Coverage Status Build Status npm

easy-e

built in hopes that I will better handle exceptions, it's easy

typescript-library-starter makes it so easy to publish to npm that I'd rather publish out of convenience, its amazing!

now in technicolor!

usage

import  Erric  from  'easy-e';
import { toastify } from 'react-toastify'

  

function  showPopUpWithMessage(msg) {
    // you do work, react-toastify is pretty good if you are using react, example:
    toastify.error(msg);
}

  

var  blogpost = { name: '#buildingTheWrongThing', medium: 'medium' }

  

if(!isSluggable(blogpost.name)){

validationError = new  Erric();

validationError.setCode('validation/blog/name/unsluggable');

validationError.setMessageForHumans('sorry, only letters and spaces!');

validationError.setMetadata({ input: blogpost.name })

validationError.alert(showPopupWithMessage);

[a  pretty  red  box pops up says  'sorry, only letters and spaces!](http://serveon.site/ez.gif)

validationError.throw();
4.0.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago