From 25451a83da40d7304d748373473af2d33babb646 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Tue, 26 Mar 2024 14:59:29 +0200 Subject: [PATCH] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index de71056..c3c522e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # postal-mime -Email parser for browser environments. +Email parser for browser and serverless environments. -PostalMime can be run in the main web thread or from Web Workers. +PostalMime can be run in the main web thread or from Web Workers. It can also used in serverless functions. ## Source -Source code is available from [Github](https://github.com/postalsys/postal-mime). +The source code is available from [Github](https://github.com/postalsys/postal-mime). ## Demo @@ -14,7 +14,7 @@ See this [example](https://kreata.ee/postal-mime/example/). ## Usage -First install the module from npm: +First, install the module from npm: ``` $ npm install postal-mime @@ -26,7 +26,7 @@ next import the PostalMime class into your script: import PostalMime from './node_modules/postal-mime/src/postal-mime.js'; ``` -or when using from a Node.js app +or when using from a Node.js app or in a serverless function: ```js import PostalMime from 'postal-mime'; @@ -94,7 +94,7 @@ parser.parse(email) -> Promise Where -- **email** is the rfc822 formatted email. Either a string, an ArrayBuffer, a Blob object or a Node.js Buffer +- **email** is the rfc822 formatted email. Either a string, an ArrayBuffer, a Blob object, a Node.js Buffer, or a [ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) > **NB** you can call `parse()` only once. If you need to parse another message, create a new _PostalMime_ object.