npm.io
1.9.0 • Published 4d ago

@mailerlite/mailerlite-nodejs

Licence
MIT
Version
1.9.0
Deps
1
Size
328 kB
Vulns
0
Weekly
0
Stars
43


MailerLite logo


MailerLite Node.js SDK

MIT licensed NPM Version


Edge & serverless runtimes

The SDK works in edge/serverless runtimes that don't ship Node's http module — such as Vercel Edge Functions, Cloudflare Workers, Next.js edge routes and Deno. Requests automatically fall back to the fetch adapter in those environments, while Node and browsers keep using their existing adapters unchanged.

Query parameters

Boolean query parameters are sent as 1 and 0, and Date values as YYYY-MM-DD in the caller's local time.

Installation

npm install @mailerlite/mailerlite-nodejs

Usage

// For ECMAScript (ESM)
import MailerLite from '@mailerlite/mailerlite-nodejs';

const mailerlite = new MailerLite({
  api_key: "API_KEY"
});
// For CommonJS (CJS)
const MailerLite = require('@mailerlite/mailerlite-nodejs').default;

const mailerlite = new MailerLite({
  api_key: "API_KEY"
});

Keywords