Skip to content

Provide more utility functions (pick, ...) #24

Description

@schickling

There's a number of common utility functions which are useful in Contentlayer projects (e.g. a type-safe pick function) like below or here:

image

We should provide these utility functions out of the box with Contentlayer. Candidates:

  • pick: Type-safe function similar to TS Pick type
  • A function that helps with getting the "next" and "previous" document (common in docs pages)
  • A function that helps with sorting documents
  • findById

If you'd like to see an other utility function added, please share your requests/ideas in the comments below. 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions