
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
https://github.com/cho45/node-here.js
node-here.js is here-document feature for node.js.
This is implemeneted with block comment syntax.
var here = require('here').here;
var string = here(/*
foo
bar
baz
*/);
here(/* document */)
here
function returns block comment on argument as string like object.
Any characters can be escaped by backslash \
like following:
here(/*
/\* *\/
*/); //=> '/* */'
here(/* \\ */); //=> '\\'
If a here document starts with ''/*
, it is wysiwyg mode which does not translate any escape characters.
here(''/*
\foo\bar\baz
*/); //=> '\\fooo\\bar\\baz'
In this case, string */
can be apeared in here document.
here()
returns not string but String object. That is like following:
var a = here(/* foobar */);
typeof a === 'object';
a.valueOf(); //=> 'foobar'
"Hello, " + a; //=> 'Hello, foobar';
Returning String object hav unindent()
utility method which removes indent in a string.
here(/*
foo
bar
baz
*/).unindent()
is convert to following:
foo
bar
baz
FAQs
here-document on node.js
The npm package here receives a total of 42,507 weekly downloads. As such, here popularity was classified as popular.
We found that here demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.