This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const KATAKANA_PATTERN = /[\u30A1-\u30FA]/g | |
| function convertKatakanaToHiragana (katakana: string): string { | |
| return katakana.replace(KATAKANA_PATTERN, toHiragana) | |
| } | |
| function toHiragana (katakana: string): string { | |
| const code = katakana.charCodeAt(0) - 0x60 | |
| return String.fromCharCode(code) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const HttpMethod = { | |
| Get: 'GET', | |
| Head: 'HEAD', | |
| Post: 'POST', | |
| Put: 'PUT', | |
| Delete: 'DELETE', | |
| Connect: 'CONNECT', | |
| Options: 'OPTIONS', | |
| Trace: 'TRACE', | |
| Patch: 'PATCH' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tryEscape (escape) { | |
| return new Promise((resolve, reject) => { | |
| try { | |
| const result = escape() | |
| resolve(result) | |
| } catch (e) { | |
| reject(e) | |
| } | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (copy) { | |
| main() | |
| async function main () { | |
| const rowElements = getRowElements() | |
| console.log(`${rowElements.length}件のアイテムを取得開始します。`) | |
| const items = await Promise.all(rowElements.map(async (rowElement) => { | |
| const item = await toItem(rowElement) | |
| console.log(`Done: ${item.title}`) | |
| return item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package middleware | |
| import ( | |
| "context" | |
| "strings" | |
| "github.com/labstack/echo/v4" | |
| firebase "firebase.google.com/go" | |
| "google.golang.org/api/option" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <sup>[<i><a href="https://ja.wikipedia.org/wiki/%E8%A6%81%E5%87%BA%E5%85%B8">要出典</a></i>]</sup> |
NewerOlder