Comparing version 1.1.1 to 1.2.0
@@ -5,5 +5,6 @@ import { STYLES } from './styles'; | ||
import { mdv1 } from './mdv1'; | ||
import { newlines } from './newlines'; | ||
import { link } from './link'; | ||
import { symbol } from './symbol'; | ||
import { link } from './link'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, newlines, newlines as ln, symbol, symbol as sm, link, link as telink }; | ||
import { spaces } from './whitespace'; | ||
import { newlines } from './whitespace'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, link, link as telink, symbol, symbol as sm, spaces, spaces as ls, newlines, newlines as ln }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.telink = exports.link = exports.sm = exports.symbol = exports.ln = exports.newlines = exports.mdv1 = exports.html = exports.md = exports.mdv2 = exports.PARSE_MODES = exports.STYLES = void 0; | ||
exports.ln = exports.newlines = exports.ls = exports.spaces = exports.sm = exports.symbol = exports.telink = exports.link = exports.mdv1 = exports.html = exports.md = exports.mdv2 = exports.PARSE_MODES = exports.STYLES = void 0; | ||
const styles_1 = require("./styles"); | ||
@@ -14,10 +14,12 @@ Object.defineProperty(exports, "STYLES", { enumerable: true, get: function () { return styles_1.STYLES; } }); | ||
Object.defineProperty(exports, "mdv1", { enumerable: true, get: function () { return mdv1_1.mdv1; } }); | ||
const newlines_1 = require("./newlines"); | ||
Object.defineProperty(exports, "newlines", { enumerable: true, get: function () { return newlines_1.newlines; } }); | ||
Object.defineProperty(exports, "ln", { enumerable: true, get: function () { return newlines_1.newlines; } }); | ||
const link_1 = require("./link"); | ||
Object.defineProperty(exports, "link", { enumerable: true, get: function () { return link_1.link; } }); | ||
Object.defineProperty(exports, "telink", { enumerable: true, get: function () { return link_1.link; } }); | ||
const symbol_1 = require("./symbol"); | ||
Object.defineProperty(exports, "symbol", { enumerable: true, get: function () { return symbol_1.symbol; } }); | ||
Object.defineProperty(exports, "sm", { enumerable: true, get: function () { return symbol_1.symbol; } }); | ||
const link_1 = require("./link"); | ||
Object.defineProperty(exports, "link", { enumerable: true, get: function () { return link_1.link; } }); | ||
Object.defineProperty(exports, "telink", { enumerable: true, get: function () { return link_1.link; } }); | ||
const whitespace_1 = require("./whitespace"); | ||
Object.defineProperty(exports, "spaces", { enumerable: true, get: function () { return whitespace_1.spaces; } }); | ||
Object.defineProperty(exports, "ls", { enumerable: true, get: function () { return whitespace_1.spaces; } }); | ||
Object.defineProperty(exports, "newlines", { enumerable: true, get: function () { return whitespace_1.newlines; } }); | ||
Object.defineProperty(exports, "ln", { enumerable: true, get: function () { return whitespace_1.newlines; } }); |
@@ -5,5 +5,6 @@ import { STYLES } from './styles'; | ||
import { mdv1 } from './mdv1'; | ||
import { newlines } from './newlines'; | ||
import { link } from './link'; | ||
import { symbol } from './symbol'; | ||
import { link } from './link'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, newlines, newlines as ln, symbol, symbol as sm, link, link as telink }; | ||
import { spaces } from './whitespace'; | ||
import { newlines } from './whitespace'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, link, link as telink, symbol, symbol as sm, spaces, spaces as ls, newlines, newlines as ln }; |
@@ -5,5 +5,5 @@ import { STYLES } from './styles'; | ||
import { mdv1 } from './mdv1'; | ||
import { newlines } from './newlines'; | ||
import { link } from './link'; | ||
import { symbol } from './symbol'; | ||
import { link } from './link'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, newlines, newlines as ln, symbol, symbol as sm, link, link as telink }; | ||
import { spaces, newlines } from './whitespace'; | ||
export { STYLES, STYLES as PARSE_MODES, mdv2, mdv2 as md, html, mdv1, link, link as telink, symbol, symbol as sm, spaces, spaces as ls, newlines, newlines as ln }; |
{ | ||
"name": "teleform", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "telegram formatting", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/main.js", |
# Teleform | ||
Teleform can help you format Telegram messages, escape special characters, switch formatting styles, convert special entities to formatted text and vice versa, use Unicode symbols, and form Telegram links. | ||
Teleform can help you format Telegram messages, escape special characters, switch formatting styles, convert special entities to formatted text and vice versa, form Telegram links, and use Unicode symbols. | ||
@@ -14,5 +14,6 @@ ## Installation | ||
mdv2, md, html, mdv1, | ||
newlines, ln, | ||
link, telink, | ||
symbol, sm, | ||
link, telink | ||
spaces, ls, | ||
newlines, ln | ||
} = require('teleform') | ||
@@ -23,5 +24,6 @@ /* | ||
mdv2, md, html, mdv1, | ||
newlines, ln, | ||
link, telink, | ||
symbol, sm, | ||
link, telink | ||
spaces, ls, | ||
newlines, ln | ||
} from 'teleform' | ||
@@ -32,5 +34,6 @@ */ | ||
console.log(md === mdv2) // true | ||
console.log(telink === link) // true | ||
console.log(sm === symbol) // true | ||
console.log(ls === spaces) // true | ||
console.log(ln === newlines) // true | ||
console.log(sm === symbol) // true | ||
console.log(telink === link) // true | ||
``` | ||
@@ -483,43 +486,2 @@ | ||
### Using Unicode | ||
You can use a few Unicode symbols with the `symbol` function. | ||
``` | ||
for (const code of [ | ||
'0', // 🯰 | ||
'1', // 🯱 | ||
'2', // 🯲 | ||
'3', // 🯳 | ||
'4', // 🯴 | ||
'5', // 🯵 | ||
'6', // 🯶 | ||
'7', // 🯷 | ||
'8', // 🯸 | ||
'9', // 🯹 | ||
'8-', // ∞ (infinity) | ||
'+', // + (plus) | ||
'-', // − (minus) | ||
'+-', // ± (plus‐minus) | ||
'*', // × (multiplication) | ||
'/', // ÷ (division) | ||
'=', // = | ||
'~~', // ≈ | ||
'>=', // ≥ | ||
'<=', // ≤ | ||
'!=', // ≠ | ||
'.', // · (middle dot) | ||
'o', // ° (degree) | ||
'O', // • (bullet) | ||
'>_', // 🮥 | ||
'<', // ‹ | ||
'>', // › | ||
'<<', // « | ||
'>>', // » | ||
'h', // ‐ (hyphen) | ||
'H', // ‑ (non‐breaking hyphen) | ||
'-', // – (en dash) | ||
'--', // — (em dash) | ||
'...' // … (horizontal ellipsis) | ||
]) console.log(`${code} => ${symbol(code)}`) | ||
``` | ||
### Forming Links | ||
@@ -1133,2 +1095,43 @@ You can form links to Telegram users, bots, groups, channels, etc. | ||
### Using Unicode | ||
You can also use a few Unicode symbols with the `symbol` function. | ||
``` | ||
for (const code of [ | ||
'0', // 🯰 | ||
'1', // 🯱 | ||
'2', // 🯲 | ||
'3', // 🯳 | ||
'4', // 🯴 | ||
'5', // 🯵 | ||
'6', // 🯶 | ||
'7', // 🯷 | ||
'8', // 🯸 | ||
'9', // 🯹 | ||
'8-', // ∞ (infinity) | ||
'+', // + (plus) | ||
'-', // − (minus) | ||
'+-', // ± (plus‐minus) | ||
'*', // × (multiplication) | ||
'/', // ÷ (division) | ||
'=', // = | ||
'~~', // ≈ | ||
'>=', // ≥ | ||
'<=', // ≤ | ||
'!=', // ≠ | ||
'.', // · (middle dot) | ||
'o', // ° (degree) | ||
'O', // • (bullet) | ||
'>_', // 🮥 | ||
'<', // ‹ | ||
'>', // › | ||
'<<', // « | ||
'>>', // » | ||
'h', // ‐ (hyphen) | ||
'H', // ‑ (non‐breaking hyphen) | ||
'-', // – (en dash) | ||
'--', // — (em dash) | ||
'...' // … (horizontal ellipsis) | ||
]) console.log(`${code} => ${symbol(code)}`) | ||
``` | ||
## Contributing | ||
@@ -1135,0 +1138,0 @@ Contributions are only allowed in TON: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
169648
3220
1136