Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cua.run/client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cua.run/client

cua JavaScript client

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@cua.run/client

cua is your favorite async tasks handler to offload your JavaScript API.

Install

yarn add @cua.run/client

# or

npm i @cua.run/client

Configuration

import cua from "@cua.run/client";

cua.init({ apiToken: "YOUR API TOKEN" });

Usage

For a seamless integration with your project, we recommend to install our @cua.run/babel babel plugin. Our babel plugin will replace all usage of cua functions to client pushes:

import type { NextApiRequest, NextApiResponse } from "next";
import sentToIntercom from "../../cua-functions/sendToIntercom";

export default function handler(req: NextApiRequest, res: NextApiResponse) {
  const user = { /* ... */ }
  await sentToIntercom(user); // will be replaced by `cua.push('sentToIntercom', [user])` by our babel plugin
  res.status(200).json({ name: "John Doe" });
}

Programmatic usage

await cua.push('function name', args)

FAQs

Package last updated on 14 Aug 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

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