Installation

This library is available for Node.js, Deno, and browser (or other ESM environment).

Node.js

Install slack-message-parser package hosted on NPM.

# Use your package manager's install command
npm i slack-message-parser
import { parse } from "slack-message-parser";

console.dir(parse("Slack *message* ~to~ _parse_"));

Deno

Import from https://deno.land/x/slack_message_parser@<VERSION>/mod.ts.

import { parse } from "https://deno.land/x/slack_message_parser@v3.0.0/mod.ts";

console.dir(parse("Slack *message* ~to~ _parse_"));

Browser

Use NPM-to-ESM service such as Skypack.

import { parse } from "https://cdn.skypack.dev/slack-message-parser@^3.0.0";

console.dir(parse("Slack *message* ~to~ _parse_"));