0.0.2 • Published 2 years ago

@kdt310722/config v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@kdt310722/config

npm version npm downloads ci coverage issues license

Simple config parser and validate using Zod for Javascript / Typescript project

Usage

Install package:

# npm
npm install @kdt310722/config

# yarn
yarn add @kdt310722/config

# pnpm
pnpm install @kdt310722/config

# bun
bun install @kdt310722/config

Import:

// ESM
import { defineConfig } from '@kdt310722/config'

// CommonJS
const { defineConfig } = require('@kdt310722/config')

Use:

const config = defineConfig({
    key: z.string().default('value'),
})

console.log(config.parse())

License

Published under MIT License.