Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@muil/muil-javascript
Advanced tools
npm install @muil/muil-javascript --save
yarn add @muil/muil-javascript
First you have to initialize the service with Api Key and project ID
import muil from '@muil/muil-javascript';
muil.init({ apiKey: '123456.1234567890.awesomeProject', projectId: 'awesomeProject' });
To generate html from template pass templateId and props
const html = await muil.generate({
templateId: 'awesomeTemplate',
props: { name: 'John' },
});
You can also set type to 'pdf' or 'png' to generate PDF or png, functions returns pdf or png as binary string
const content = await muil.generate({
templateId: 'awesomeTemplate',
type: 'pdf',
props: { name: 'John' },
});
To generate email from template and send it
muil.sendMail({
templateId: 'awesomeTemplate',
subject: 'This is an awesome mail',
to: 'mail@example.com',
props: { name: 'John' },
});
muil.sendMail({
templateId: 'awesomeTemplate',
subject: 'This is an awesome mail',
to: 'mail@example.com',
props: { name: 'John' },
attachments: [{
filename: 'a.png',
type: 'png',
templateId: 'awesomeTemplate',
props: {
name: 'John',
}
},
{
filename: 'file.txt',
content: 'hello world!'
},
{
filename: 'license.txt',
path: 'https://example.com/license.txt'
}]
});
to upload asset to you Muil project bucket
await muil.uploadAsset('file.png', value);
Value can be a string, a buffer or a file stream.
to delete asset from Muil project bucket
await muil.deleteAsset('file.png');
FAQs
## Installation
The npm package @muil/muil-javascript receives a total of 1,714 weekly downloads. As such, @muil/muil-javascript popularity was classified as popular.
We found that @muil/muil-javascript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.