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

@puregram/markup

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puregram/markup - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

34

lib/markup.js

@@ -232,22 +232,24 @@ "use strict";

exports.formatDedent = formatDedent;
function processEntity(entity) {
for (const [key, value] of [['text', 'entities'], ['caption', 'caption_entities'], ['quote', 'quote_entities']]) {
if (key in entity && entity[key] instanceof format_1.Formatted) {
const fmt = entity[key];
entity[key] = fmt.format();
entity[value] = fmt.entities;
}
}
}
// TODO: refactor
function processParams(path, params) {
for (const [key, value] of [['text', 'entities'], ['caption', 'caption_entities']]) {
if (path === 'sendMediaGroup') {
for (const entity of params.media) {
if (key in entity && entity[key] instanceof format_1.Formatted) {
const fmt = entity[key];
entity[key] = fmt.format();
entity[value] = fmt.entities;
}
}
if (path === 'sendMediaGroup') {
for (const entity of params.media) {
processEntity(entity);
}
else {
if (key in params && params[key] instanceof format_1.Formatted) {
const fmt = params[key];
params[key] = fmt.format();
params[value] = fmt.entities;
}
}
}
else {
processEntity(params);
}
if ('reply_parameters' in params && 'quote' in params.reply_parameters) {
processEntity(params.reply_parameters);
}
if (path === 'answerInlineQuery') {

@@ -254,0 +256,0 @@ const iqp = params;

{
"name": "@puregram/markup",
"version": "1.3.2",
"version": "1.3.3",
"description": "simple yet powerful markup system for puregram",

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

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