4 ms·
Interesting choice for the inline code option in the examples to parse the COBOL out of a comment in the string representation of a function. Especially conside
by deergomoo 3y ago
Interesting choice for the inline code option in the examples to parse the COBOL out of a comment in the string representation of a function. Especially considering the JSDoc suggests it also accepts a plain string. Would love to know the reason for that.
- maxwellg 3y agoIt’s an old trick for pleasant-ish multi-line strings from before node/JavaScript had `backticks`. You can stringify the function and parse the string out of the embedded comment.
- hombre_fatal 3y agoWe used to use a library (multiline) to write SQL strings in Node. const str = multiline(()=>{/* <!doctype html> <html> <body> <h1> unicorns</h1> </body> </html> */}); https://www.npmjs.com/package/multiline https://www.npmjs.com/package/multiline