
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@plunk/node
Advanced tools
This project contains the helper library for interacting with the Plunk API using Node.js.
Installing the latest version can be done through your package manager.
npm i @plunk/node
yarn add @plunk/node
Any interaction you want to make with the Plunk API needs to be done through the Plunk client. You can use a default import to get started.
import Plunk from '@plunk/node';
// Using the default API URL
const plunk = new Plunk("Your secret key");
// Or specifying a custom API URL
const plunkCustom = new Plunk("Your secret key", { baseUrl: "https://selfhosted.example.com/api/v1/" });
Used to publish an event
event
: The name of the event to publishemail
: The email address of the user to publish the event tosubscribed
[Optional]: Whether to the contact is subscribed to marketing emails, defaults to true
data
[Optional]: An object containing the data to attach to the userconst success = await plunk.events.track({
event: "new-project",
email: "hello@useplunk.com",
data: {
company: "Plunk"
}
});
Used to send a transactional email
to
: The email address of the recipientsubject
: The subject of the emailbody
: The body of the emailtype
[Optional]: The type of email to send (html
or markdown
)from
[Optional]: The email address of the sendername
[Optional]: The name of the sendersubscribed
[Optional]: Whether to the contact is subscribed to marketing emails, defaults to false
const success = await plunk.emails.send({
to: "hello@useplunk.com",
subject: "Welcome to Plunk",
body: "Hello world!",
});
FAQs
Official Node.js library for useplunk.com
The npm package @plunk/node receives a total of 2,738 weekly downloads. As such, @plunk/node popularity was classified as popular.
We found that @plunk/node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.