Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: comment-parser
node v17.9.1
version:
master
endpoint
share
tweet
const commentParser = require("comment-parser") const { name: nameTokenizer, tag: tagTokenizer, type: typeTokenizer, description: descriptionTokenizer } = commentParser.tokenizers; commentParser.parse( `/** * The description * * @default [] */`, { tokenizers: [ tagTokenizer(), typeTokenizer(), (spec) => { if (spec.tag === 'default') { return spec; } return nameTokenizer()(spec); }, descriptionTokenizer('preserve') ] } );
Created from: https://npm.runkit.com/comment-parser
Loading…
no comments
sign in
to comment