Gathering detailed insights and metrics for @chance/mailgun-js
Gathering detailed insights and metrics for @chance/mailgun-js
Gathering detailed insights and metrics for @chance/mailgun-js
Gathering detailed insights and metrics for @chance/mailgun-js
npm install @chance/mailgun-js
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (88.25%)
JavaScript (11.75%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
6 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jun 18, 2021
Latest Version
0.2.0
Package Id
@chance/mailgun-js@0.2.0
Unpacked Size
224.09 kB
Size
43.75 kB
File Count
44
NPM Version
7.13.0
Node Version
14.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
29
@chance/mailgun-js
A fork of https://github.com/mailgun/mailgun-js
This is for my personal use, but it may be useful for others. I might add my own documentation eventually but the API is mostly the same as the original.
TODO:
1npm install @chance/mailgun-js 2# OR 3yarn add @chance/mailgun-js
mailgun.js
When instantiating a client, the original lib has a dependency on ky-universal
. You might already be using node-fetch
or some other wrapper in your project, so this fork requires you to establish that dependency and tell the client how to make requests.
1// Note: Named export instead of a default export! 2import { Mailgun } from "@chance/mailgun-js"; 3 4// We're using node-fetch, but you could also use ky-universal if you want, 5// or native fetch if using in the browser 6import nodeFetch from "node-fetch"; 7 8import FormData from "form-data"; 9 10const mailgun = new Mailgun(FormData); 11const mg = mailgun.client({ 12 username: "api", 13 key: process.env.MAILGUN_API_KEY, 14 publicKey: process.env.MAILGUN_PUBLIC_API_KEY, // Note: `publicKey` vs. `public_key` 15 fetch: nodeFetch, 16});
There is also lots of room for improvement in the types in the core lib. I'm going to try and tackle some of these. Would love to get these fixed upstream, but there are some old open PRs that don't give me too much hope. We'll see!
Lastly, I'm bundling with Rollup instead of Webpack. I want the bundles to be extremely light on modifying the source to avoid issues like this (this one in particular is breaking the source lib in Node which ... kind of sucks). I'm also providing ES modules and may decide to skip bundling altogether in a future version. We'll see.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More