Features
- Sign JWT in Node.js without using built-in Crypto Module
Dependencies
- crypto-js // stand-alone library (as of version 4.1.1)
Type Dependencies
Features
Dependencies
Type Dependencies
| /* Types */ | |
| type Person = { | |
| age: number, | |
| city: string | |
| } | |
| type People = { [name: string]: Person } | |
| // Based on Tailwind CSS v3.0.23 | |
| // Requires TypeScript 4.1 or later (Template Literal Types) | |
| // Reference https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#template-literal-types | |
| type Name = | |
| | 'amber' | |
| | 'blue' | |
| | 'cyan' | |
| | 'emerald' |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <script> | |
| // Check if the client is Internet Explorer. | |
| if (/MSIE|Trident/.test(window.navigator.userAgent)) | |
| // In Cloudflare Pages trim .html from the URL | |
| // It is not supported in older versions of IE | |
| // Can be reproduced in version 11.0.9600.18860 |
| // https://github.com/lokesh/color-thief | |
| const ColorThief = require('colorthief'); | |
| // Preferences | |
| const directory = './images'; | |
| const extension = 'jpg'; | |
| const filenames = [ | |
| 'loon-yyy-riven', | |
| 'dining-agreed-gumball', | |
| 'cowan-logs-bagged', |
| const puppeteer = require('puppeteer'); // [email protected] | |
| const urls = [ | |
| 'https://en.wikipedia.org/wiki/TypeScript', | |
| 'https://en.wikipedia.org/wiki/JavaScript', | |
| ]; | |
| const urlCount = urls.length; | |
| const delay = 5000; // Delay between each save |
| { | |
| // Steps | |
| // 1. Open workspace in the Visual Studio Code | |
| // 2. Install 'esno' (https://www.npmjs.com/package/esno) | |
| // 3. Create a '.vscode/tasks.json' file | |
| // 4. Open a TypeScript file | |
| // 5. Press 'Ctrl + Shift + B' (run build task) | |
| "version": "2.0.0", | |
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | |
| // for the documentation about the tasks.json format |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="NewErrorPageTemplate.css"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>이 페이지에 연결할 수 없음</title> | |
| <script src="errorPageStrings.js" language="javascript" type="text/javascript"> | |
| </script> | |
| <script src="httpErrorPagesScripts.js" language="javascript" type="text/javascript"> |
| { | |
| "[csv]": { | |
| "files.encoding": "utf8bom" | |
| }, | |
| "[markdown]": { | |
| "editor.fontFamily": "'엘리스 디지털코딩체 ver.H', 'Elice DigitalCoding OTF', monospace", | |
| "prettier.tabWidth": 2, | |
| "prettier.useTabs": false | |
| }, | |
| "[svelte]": { |
| const tabIndexGuard = (el: Element): el is HTMLElement => (el as HTMLElement).tabIndex >= 0; | |
| // Based on https://svelte.dev/examples/modal | |
| export const focusLock = (e: KeyboardEvent, el: HTMLElement) => { | |
| if (e.key === 'Tab') { | |
| // trap focus | |
| const nodes = el.querySelectorAll('*'); | |
| const tabbable = Array.from(nodes).filter(tabIndexGuard); | |
| let index = tabbable.indexOf(document.activeElement as HTMLElement); |