Closed ymc9 closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
zenstack-new-site | 🔄 Building (Inspect) | Visit Preview | 💬 Add feedback | Sep 19, 2024 8:23pm |
The pull request introduces a new function called nanoid()
to the ZModel language documentation. This function generates unique identifiers based on the nanoid specification and accepts an optional integer parameter for the length of the identifier. It complements the existing cuid()
function, which generates globally unique identifiers based on the CUID specification. The documentation includes a description and code snippet for the nanoid()
function, maintaining consistency with the existing documentation format.
File | Change Summary |
---|---|
docs/reference/zmodel-language.md | Added function nanoid(length: Int?): String {} and documentation for the new function. |
sequenceDiagram
participant User
participant ZModel
User->>ZModel: Call nanoid(length)
ZModel-->>User: Return unique identifier
docs/reference/zmodel-language.md (2)
`876-880`: **LGTM!** The `nanoid()` attribute function looks good. The signature is consistent with other attribute functions, and the optional `length` parameter provides flexibility. --- `882-883`: **Looks good!** The description provides helpful context about the `nanoid` spec in a concise manner that's consistent with the existing documentation.
Summary by CodeRabbit
New Features
nanoid()
function for generating unique identifiers in the ZModel language.Documentation
nanoid()
function and its usage.