🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

eml-parse-js

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

eml-parse-js

format EML file in browser env

1.2.0-beta.0
latest
93

Supply Chain Security

100

Vulnerability

89

Quality

79

Maintenance

100

License

Uses eval

Supply chain risk

Package uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.

Found 1 instance in 1 package

Version published
Weekly downloads
9.1K
-10.07%
Maintainers
0
Weekly downloads
 
Created
Issues
3

eml-parse-js

RFC 822 EML file format parser and builder, Can be used in browser environment

fork from eml-format-js(used in Browser env) & eml-format (used in NodeJs env)

  • fix eml-format-js for parsing html from the eml with quoted-printable
  • add data with base64 in attachment

start guide

import { parseEml, readEml, GBKUTF8, decode } from 'eml-parse-js';

// const eml = await axios(http | ajax).get()
// `.eml` file 
readEml(eml, (err, ReadEmlJson) => {
  
});

@types


interface Attachment {
	name: string;
	contentType: string;
	inline: boolean;
	data: string | Uint8Array;
	data64: string;
	filename?: string;
	mimeType?: string;
	id?: string;
	cid?: string;
}

interface ReadEmlJson {
  attachments: Attachment
	date: Date | string;
	subject: string;
	from: EmailAddress | EmailAddress[] | null;
	to: EmailAddress | EmailAddress[] | null;
	cc?: EmailAddress | EmailAddress[] | null;
	headers: EmlHeaders;
	multipartAlternative?: {
		'Content-Type': string;
	};
	text?: string;
	textheaders?: BoundaryHeaders;
	html?: string; // email html data
	htmlheaders?: BoundaryHeaders;
	attachments?: Attachment[];
	data?: string;
}

FAQs

Package last updated on 27 Dec 2024

Did you know?

Socket

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.

Install

Related posts