@velin-dev/utils

Develop prompts with Vue SFC or Markdown like pro.
200,743 78
Install
npm install @velin-dev/utils@0.4.1
Latest Version:0.4.1
License:MIT
Last Updated:Oct 20, 2026
Links: GitHub  ·  npm
Maintainer: nekomeowww

@velin-dev/utils

npm version npm downloads bundle JSDocs License

Refer to README.md for more information.

Custom tags in prompts

toMarkdown() converts standard HTML elements to Markdown and preserves other element tags and their attributes. The standard tag list comes from html-tags, which excludes obsolete HTML tags. Standard HTML inside custom elements is still converted:

import { toMarkdown } from '@velin-dev/utils/to-md'

await toMarkdown('<instructions priority="high"><strong>Be concise</strong></instructions>')
// <instructions priority="high">**Be concise**</instructions>

This also applies to the Vue, React, and Markdown prompt renderers, which share the same conversion. Existing handling of standard elements, such as removing script and style, still applies. Vue SFC compilation may warn about unresolved custom elements; preserving tags in the output does not change component resolution.

The input is parsed as HTML, not XML: tag and attribute casing, whitespace, and entity spelling can be normalized. Write custom elements with explicit closing tags when providing HTML or Markdown source; HTML parsing does not recognize XML self-closing syntax for these elements. Vue/JSX self-closing elements are expanded by the component renderer before conversion. XML declarations and CDATA are not supported as XML syntax.

License

MIT

Related Packages

@velin-dev/vue

Develop prompts with Vue SFC or Markdown like pro.

7,871 78
@velin-dev/source-vue

Vue source tooling for Velin.

721 78

Version History

Version Released License
0.4.1 MIT
0.4.0 MIT
0.3.4 MIT
0.3.2 MIT
0.3.1 MIT
Pre-releases (4)
Version Released License
1.0.0-beta.8 MIT
1.0.0-beta.7 MIT
1.0.0-beta.6 MIT
1.0.0-beta.3 MIT