New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

highlights-email-to-json

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlights-email-to-json

Converts an email of plain text notes into a JSON object

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by175%
Maintainers
1
Weekly downloads
 
Created
Source

Convert an email export of notes into a JSON object. This is handy for saving notes from Instapaper or directly from the web.

Installation

npm install highlights-email-to-json --save

Expected email format

The email you send must match the following format in order to be converted by this package.

---
title: Book Title
authors: Author Name; Another author name
---
Note one text.


Note two text.

Note: The front-matter section at the top will accept any attribute.

API

toJSON(email) ⇒ Promise.<Object>

Convert a notes email export into a JSON object. Rejects if the mail isn't a valid notes export.

ParamType
emailBuffer | Stream | String

Example

const toJSON = require("highlights-email-to-json");
const email = readFile(emailPath);

toJSON(email).then((data) => {
	console.log(data);
});

FAQs

Package last updated on 14 Aug 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc