style: format data fix script
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
|
import { spawnSync } from "node:child_process";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
import { mkdir, writeFile } from "node:fs/promises";
|
import { mkdir, writeFile } from "node:fs/promises";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { spawnSync } from "node:child_process";
|
|
||||||
|
|
||||||
const toSlug = (raw: string): string =>
|
const toSlug = (raw: string): string =>
|
||||||
raw
|
raw
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/[^a-z0-9]+/g, "_")
|
.replace(/[^a-z0-9]+/gu, "_")
|
||||||
.replace(/^_+|_+$/g, "");
|
.replace(/^_+|_+$/gu, "");
|
||||||
|
|
||||||
const formatYyyymmdd = (date = new Date()): string => {
|
const formatYyyymmdd = (date = new Date()): string => {
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
|
|||||||
Reference in New Issue
Block a user