New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

func-async

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

func-async

Functional async function

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Functional async function

A golang function like helper for avoiding async function try...catch mental model.

Installation

  • Using npm

    $ npm install func-async --save
    
  • Using yarn

    $ yarn add func-async
    

Usage

import funcAsync from 'func-async'

export async function anyFunc() {
  const [answer, exception] = await funcAsync(anyPromiseLikeOperation())

  if (exception) {
    throw exception
  }

  if (answer) {
    // ...
  }
}

License

MIT @ Bowen Liu

Keywords

FAQs

Package last updated on 02 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc