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

tg-format

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tg-format - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

index.js

@@ -83,9 +83,9 @@ const Escaped = { '<': '&lt;', '>': '&gt;', '&': '&amp;' };

}
// TODO: padStart, padEnd, normalize, replace, replaceAll, split, trim, trimStart, trimEnd
// TODO: padStart, padEnd, replace, replaceAll, split, trim, trimStart, trimEnd
}
for (let method of ['charAt', 'charCodeAt', 'codePointAt', 'endsWith', 'includes', 'indexOf',
for (const method of ['charAt', 'charCodeAt', 'codePointAt', 'endsWith', 'includes', 'indexOf',
'isWellFormed', 'lastIndexOf', 'localeCompare', 'match', 'matchAll', 'normalize',
'search', 'split', 'startsWith', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase',
'toString', 'toUpperCase', 'toWellFormed', 'trim', 'trimEnd', 'trimStart']) {
'search', 'startsWith', 'toWellFormed']) {
// Lift some methods from String class

@@ -96,2 +96,9 @@ FormattedString.prototype[method] = function() {

}
for (const method of ['toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase']) {
FormattedString.prototype[method] = function() {
const result = new FormattedString(this.text[method].apply(this.text, arguments));
result.entities = this.entities.map(entity => Object.assign({}, entity));
return result;
}
}

@@ -98,0 +105,0 @@ function fmt(strs, ...exprs) {

{
"name": "tg-format",
"version": "1.0.0",
"version": "1.0.1",
"description": "A tiny Node.JS helper for sending formatted text messages using Telegram Bot API",

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

@@ -16,3 +16,3 @@ # tg-format

```js
const { html } = require('tgformat');
const { html } = require('tg-format');

@@ -42,3 +42,3 @@ // Предполагается, что функция sendMessage вызывает соответствующий метод Telegram Bot API

```js
const { fmt } = require('tgformat');
const { fmt } = require('tg-format');

@@ -45,0 +45,0 @@ // Предполагается, что функция sendMessage вызывает соответствующий метод Telegram Bot API

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