1.0.0 • Published 6 years ago

go-func-yourself v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

GoFuncYourself

GoFuncYourself is a library that converts proper JavaScript code into tuple return, Golang-style functions.

Installing

npm install go-func-yourself

How it works

It's as easy as

import gfy from 'go-func-yourself'

const resRunner = () => {
  let { res, err } = gfy(() => {
    // ... your func
  });
  if (err) {
    // ... do error
  }
  // ... do success
};

Contributing

Open a PR and I probably won't review it

Liscense

MIT