@coursebuilder/utils-core
v1.0.0
Published
Core utilities for the CourseBuilder monorepo.
Readme
@coursebuilder/utils-core
Core utilities for the CourseBuilder monorepo.
Installation
pnpm add @coursebuilder/utils-coreUsage
guid
Generates a random alphanumeric identifier with 5 characters. Uses lowercase letters (a-z) and numbers (0-9).
Returns
A unique 5-character string identifier.
Example
import { guid } from '@coursebuilder/utils-core/guid'
const id = guid() // Returns something like "a7b2x"Contributing
To add a new utility to this package:
- Create a new file in the
srcdirectory - Implement your utility with proper TSDoc comments
- Export it from the package by updating
package.json - Add tests in a corresponding
.test.tsfile - Build and test your changes:
cd packages/utils-core
pnpm build
pnpm test