From 227ec066ec15a9807549d7e2e7b6d88cb55afa6d Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 16 Dec 2024 15:12:59 +0100 Subject: [PATCH] feat: expose `genObjectKey` and `wrapInDelimiters` utils --- README.md | 10 ++++++++++ src/index.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index baf4c15..c741388 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,16 @@ Generate a typescript `export type` statement. Generate typescript object type. +## Utils + +### `genObjectKey(key)` + +Generate a safe javascript variable name for an object key. + +### `wrapInDelimiters(lines, indent, delimiters, withComma)` + +Wrap an array of strings in delimiters. + ## Contribution diff --git a/src/index.ts b/src/index.ts index 25f76cb..f2eb4c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,3 +3,4 @@ export * from "./object"; export * from "./string"; export * from "./types"; export * from "./typescript"; +export * from "./utils";