go-func-yourself

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i go-func-yourself

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.23 kB

Total Files

3

Last publish

Collaborators

  • jakecooper