Buckets:
| import { stderr } from "process"; | |
| export interface Spinner { | |
| update(message: string): void; | |
| done(message?: string): void; | |
| fail(message?: string): void; | |
| } | |
| function enabled(): boolean { | |
| return Boolean(stderr.isTTY) && process.env.NO_COLOR !== "1"; | |
| } | |
| export function createSpinner(message: string): Spinner { | |
| let last = message; | |
| if (enabled()) stderr.write(`${message}\n`); | |
| return { | |
| update(next: string) { | |
| last = next; | |
| if (enabled()) stderr.write(`${next}\n`); | |
| }, | |
| done(next?: string) { | |
| if (enabled()) stderr.write(`${next || last}\n`); | |
| }, | |
| fail(next?: string) { | |
| stderr.write(`${next || last}\n`); | |
| }, | |
| }; | |
| } | |
Xet Storage Details
- Size:
- 669 Bytes
- Xet hash:
- 4c268e030cf6374c2ed8e57ab6acaa92e922914a9b39ce81f85c18e5cd697cd1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.