Category: JavaScript

node 0

Call and retry last Allocation failed

Solu­tion: node –max–old-space-size=4096 <file­name> You need to tell node to over­write default heap size in v8. To see all the avail­able v8 flags run the fol­low­ing com­mand: node –v8-options –Fur­ther details on chromium bug

node 0

path.join vs path.resolve in node.js

path.join([…paths]) joins all the path seg­ments using plat­form spe­cific delim­iter. path.join(‘/foo’, ‘bar’, ‘baz/zxcv’, ‘abcd’, ‘..’) // ‘/foo/bar/baz/zxcv/abcd/…’ path.resolve([…paths]) Resolves all the path seg­ments into an absolute path. It processes from right to left, until…

javascript 0

href javascript ; void 0

The void oper­a­tor is often used to obtain the unde­fined prim­i­tive value. <a href=“javascript:void(0);”> Click Me </a> In this case, it is used to avoid # in the URI bar. The hrefs value will be undefined.…