🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

deasyncify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deasyncify

A powerful library to handle asynchronous programming in javascript

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
75
-79.67%
Maintainers
1
Weekly downloads
 
Created
Source

Deasyncify

A declarative way to a execute asynchronous programing with javascript with first class typescript support.

// (ES6 imports)
import { Request, Response, Next } from "express";
import Deasyncify from "deasyncify";
import prisma from "prisma";

export const getUser = async (userId: string) = (_req: Request, _res: Response, next: Next) => {
    const [user, error] = Deasyncify.watch(this.prisma.user.findOne({ where: {userId } }));
    if(error) return next(error);
    return user;
};

Keywords

deasyncify

FAQs

Package last updated on 11 Jun 2022

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