From e425425749122033f074973cefc4216f9603db73 Mon Sep 17 00:00:00 2001 From: tycrek Date: Tue, 29 Nov 2022 21:48:21 -0700 Subject: [PATCH] build: added nanoid package --- package-lock.json | 1 + package.json | 1 + src/generators/nanoid.ts | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 src/generators/nanoid.ts diff --git a/package-lock.json b/package-lock.json index 6ed19be..c9c5f99 100755 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "fs-extra": "^10.0.1", "helmet": "^4.6.0", "luxon": "^2.3.1", + "nanoid": "^3.3.4", "node-fetch": "^2.6.7", "node-vibrant": "^3.1.6", "postcss-font-magician": "^3.0.0", diff --git a/package.json b/package.json index d74eb31..def2330 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "fs-extra": "^10.0.1", "helmet": "^4.6.0", "luxon": "^2.3.1", + "nanoid": "^3.3.4", "node-fetch": "^2.6.7", "node-vibrant": "^3.1.6", "postcss-font-magician": "^3.0.0", diff --git a/src/generators/nanoid.ts b/src/generators/nanoid.ts new file mode 100644 index 0000000..cd87e7e --- /dev/null +++ b/src/generators/nanoid.ts @@ -0,0 +1,2 @@ +import { nanoid } from 'nanoid'; +export default ({ length }: { length?: number }) => nanoid(length);