Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slack-message-parser

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slack-message-parser - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

8

lib/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -33,3 +37,3 @@ if (k2 === undefined) k2 = k;

while (i < l) {
const match = parser_1.default(text, i, parseText);
const match = (0, parser_1.default)(text, i, parseText);
if (match) {

@@ -36,0 +40,0 @@ flush();

@@ -5,3 +5,3 @@ "use strict";

const combinator_1 = require("./combinator");
const parseBold = combinator_1.explicit(combinator_1.regexp(/^\*(\S([^*\n]*?|[^*\n]*? `.*?` )\S|\S)\*(?=[\s.,\])}!?\-=]|$)/, (match, text, position, parseText) => {
const parseBold = (0, combinator_1.explicit)((0, combinator_1.regexp)(/^\*(\S([^*\n]*?|[^*\n]*? `.*?` )[^\s*]|\S)\*(?=[\s~!#$%^)\-+={}[\];:'",.?/]|$)/, (match, text, position, parseText) => {
const [matchedText, content] = match;

@@ -17,3 +17,3 @@ return [

}));
const parseCode = combinator_1.explicit(combinator_1.regexp(/^`([^`]+?)`(?=[\s.,\])}!?\-=]|$)/, (match, text, position) => {
const parseCode = (0, combinator_1.explicit)((0, combinator_1.regexp)(/^`([^`]+?)`(?=[\s.,\])}!?\-=]|$)/, (match, text, position) => {
const [matchedText, content] = match;

@@ -29,3 +29,3 @@ return [

}));
const parsePreText = combinator_1.explicit(combinator_1.regexp(/^```(\s*\S[\s\S]*?\s*)```(?=[\s.,\])}!?\-=]|$)/, (match, text, position) => {
const parsePreText = (0, combinator_1.explicit)((0, combinator_1.regexp)(/^```(\s*\S[\s\S]*?\s*)```(?=[\s.,\])}!?\-=]|$)/, (match, text, position) => {
const [matchedText, content] = match;

@@ -41,3 +41,3 @@ return [

}));
const parseItalic = combinator_1.explicit(combinator_1.regexp(/^_(\S([^_\n]*?|[^_\n]*? `.*?` )\S|\S)\_(?=[\s.,\])}!?\-=]|$)/, (match, text, position, parseText) => {
const parseItalic = (0, combinator_1.explicit)((0, combinator_1.regexp)(/^_(\S([^_\n]*?|[^_\n]*? `.*?` )\S|\S)\_(?=[\s.,\])}!?\-=]|$)/, (match, text, position, parseText) => {
const [matchedText, content] = match;

@@ -53,3 +53,3 @@ return [

}));
const parseStrike = combinator_1.explicit(combinator_1.regexp(/^~(\S([^~\n]*?|[^~\n]*? `.*?` )\S|\S)\~(?=[\s.,\])}!?\-=]|$)/, (match, text, position, parseText) => {
const parseStrike = (0, combinator_1.explicit)((0, combinator_1.regexp)(/^~(\S([^~\n]*?|[^~\n]*? `.*?` )\S|\S)\~(?=[\s.,\])}!?\-=]|$)/, (match, text, position, parseText) => {
const [matchedText, content] = match;

@@ -65,3 +65,3 @@ return [

}));
const parseSingleLineQuote = combinator_1.topOfLine(combinator_1.regexp(/^&gt;(.*)(\n|$)/, (match, text, position, parseText) => {
const parseSingleLineQuote = (0, combinator_1.topOfLine)((0, combinator_1.regexp)(/^&gt;(.*)(\n|$)/, (match, text, position, parseText) => {
const [matchedText, content] = match;

@@ -87,3 +87,3 @@ const repeatedGt = content.match(/^((&gt;)+)(.*)$/);

}));
const parseMultilineQuote = combinator_1.topOfLine(combinator_1.regexp(/^&gt;&gt;&gt;([\s\S]+)$/, (match, text, position, parseText) => {
const parseMultilineQuote = (0, combinator_1.topOfLine)((0, combinator_1.regexp)(/^&gt;&gt;&gt;([\s\S]+)$/, (match, text, position, parseText) => {
const [matchedText, content] = match;

@@ -99,3 +99,3 @@ return [

}));
const parseEmoji = combinator_1.regexp(/^:([^:<`*#@!\s()$%]+):(:(skin-tone-.+?):)?/, (match, text, position) => {
const parseEmoji = (0, combinator_1.regexp)(/^:([^:<`*#@!\s()$%]+):(:(skin-tone-.+?):)?/, (match, text, position) => {
const [matchedText, name, _, variation] = match;

@@ -112,3 +112,3 @@ return [

});
const parseLink = combinator_1.regexp(/^<([^\s<>][^\n<>]*?)(\|([^<>]+?))?>/, (match, text, position, parseText) => {
const parseLink = (0, combinator_1.regexp)(/^<([^\s<>][^\n<>]*?)(\|([^<>]+?))?>/, (match, text, position, parseText) => {
const [matchedText, link, _, label] = match;

@@ -162,3 +162,3 @@ const nextPosition = position + matchedText.length;

});
exports.default = combinator_1.or([
exports.default = (0, combinator_1.or)([
parseBold,

@@ -165,0 +165,0 @@ parsePreText,

{
"name": "slack-message-parser",
"version": "2.0.1",
"version": "2.0.2",
"description": "Parser for Slack message",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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