瀏覽代碼

Adds base64 function

main
Eric Amodio 5 年之前
父節點
當前提交
e3d7590c11
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      src/system/string.ts

+ 5
- 0
src/system/string.ts 查看文件

@ -15,6 +15,11 @@ export namespace Strings {
Backslash = 92
}
export function base64(s: string): string {
const buffer = Buffer.from(s);
return buffer.toString('base64');
}
const escapeMarkdownRegex = /[\\`*_{}[\]()#+\-.!]/g;
const escapeMarkdownHeaderRegex = /^===/gm;
// const sampleMarkdown = '## message `not code` *not important* _no underline_ \n> don\'t quote me \n- don\'t list me \n+ don\'t list me \n1. don\'t list me \nnot h1 \n=== \nnot h2 \n---\n***\n---\n___';

Loading…
取消
儲存