npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

blastengine

v2.3.8

Published

blastengine is developer friendly email distribution service.

Downloads

2,380

Readme

blastengine SDK form Node.js

blastengine is developer friendly email distribution service.

blastengine

Usage

Install

npm i blastengine

Import

import { BlastEngine, Transaction, Bulk } from 'blastengine';
// or
const { BlastEngine, Transaction, Bulk } = require('blastengine');

Initialize

new BlastEngine(config.userId, config.apiKey);

Transaction & Bulk email

const mail = new Mail;
mail
	.setFrom(config.from.email, config.from.name)
	.setSubject('Test subject')
	// Add to
	.addTo('user1@example.com', {name: 'User1', code: 'code1'})
	.addTo('user2@example.com', {name: 'User2', code: 'code2'})
	// Add cc
	.addCc('cc1@example.com')
	.addCc('cc2@example.com')
	// Add bcc
	.addBcc('bcc1@example.com')
	.addBcc('bcc2@example.com')
	// Add attachment
	.addAttachment('file.png')
	.addAttachment('another.png')
	// Set body
	.setText('Content of email __name__, __code__')
	.setHtml('<h1>Content of email<h1> <p>__name__, __code__</p>');

Send email immediately

await mail.send();

Send email later

await mail.send(new Date('2021-08-01 00:00:00'));

Transaction email

No attachment email

const transaction = new Transaction;
const res = await transaction
	.setFrom(config.from.email, config.from.name)
	.setSubject('Test subject')
	.setTo(config.to)
	.setText('Content of email')
	.setHtml('<h1>Content of email')
	.send();
console.log(res);
// { delivery_id: 22 }

With attachment email

const transaction = new Transaction;
const res = await transaction
	.setFrom(config.from.email, config.from.name)
	.setSubject('Test subject')
	.setTo(config.to)
	.addAttachment('file.png')
	.addAttachment('another.png')
	.setText('Content of email')
	.setHtml('<h1>Content of email')
	.send();
console.log(res);
// { delivery_id: 22 }

Bulk email

Create bulk email

const bulk = new Bluk;
bulk
	.setFrom(config.from.email, config.from.name)
	.setSubject('Test subject')
	.setText('メールの本文 __code1__');
const res = await bulk.register();
console.log(res);
// { delivery_id: 22 }

Update & add delivery address to bulk

bulk.addTo('test1@example.jp', {key: '__code1__', value: 'value!'});
bulk.addTo('test2@example.jp', {key: '__code1__', value: 'value2!'});
const updateRes = await bulk.update();
console.log(updateRes);
// { delivery_id: 22 }

Upload delivery addresses by CSV file

const job = await bulk.import(path.resolve('./path/to/csv.csv'));
Waiting CSV uploaded
while (job.finished()) {
	await job.get();
	await new Promise((resolve) => setTimeout(resolve, 1000));
}
Download CSV import report
const zipBlob = await job.download();
// or
await job.download(path.resolve('./tests/result.zip'));

Send bulk email

const sendRes = await bulk.send();
console.log(sendRes);
// { delivery_id: 22 }

Delete bulk email

const deleteRes = await bulk.delete();
// { delivery_id: 22 }

Usage

Get multiple usages

const usages = await Usage.get(3);
const usage = usages[0];
usage.month // -> 202208
usage.current // ->  44
usage.remaining // ->  9956
usage.update_time // ->  undefined
usage.plan_id // ->  'be-plan-10000

Get usage detail

const usages = await Usage.get(3);
const usage = usages[0];
await usage.get();

Get latest usage

const usage = await Usage.getLatest();

ChangeLog

2.3.0

Change from Superagent to node-fetch.

License

MIT.