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 textInputElements = document.querySelectorAll('input[type="text"]'); | |
| const inputValues = nodeListToArray(textInputElements) | |
| .filter((x) => !!x.value) | |
| .map((x) => [getFirstLabelForInput(x), x.value].join(' ')); | |
| const text = inputValues.join('\n'); | |
| const blob = new Blob([text], { | |
| type: 'text/plain', | |
| }); | |
| downloadBlob(blob, 'text.txt'); |
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
| #!/usr/bin/env zx | |
| // Title: Replace Semantic Release config with shared config | |
| import 'zx/globals'; | |
| const semanticReleaseConfigPath = './.releaserc.js'; | |
| const hasSemanticReleaseConfig = await fs.pathExists(semanticReleaseConfigPath); | |
| if (hasSemanticReleaseConfig) { |
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
| class Task { | |
| status: "todo" | "done" = "todo"; | |
| completionDate?: Date; | |
| isDone(): this is Task & { status: "done"; completionDate: Date } { | |
| return this.status === "todo"; | |
| } | |
| } | |
| const task = new Task(); |
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
| openapi: 3.0.0 | |
| info: | |
| title: Sample API | |
| version: 1.0.0 | |
| servers: | |
| - url: http://api.example.com/v1 | |
| paths: | |
| /users: | |
| get: | |
| summary: Returns a list of users. |
OlderNewer