Closed
Description
It would be beneficial to add the 'use strict'
directive to all cjs files in this repo. Strict mode can improve performance by eliminating some JavaScript features that hinder optimizations. It also helps avoid subtle bugs by enforcing more consistent scoping and variable declarations.
At present this directive is dotted around a handful of files in the repo.
The MDN article on strict mode alludes to it, but the V8 JS engine used by Node will use more optimised execution paths when strict mode is enabled. See related Stack Overflow discussion for an example.
Happy to make a PR to resolve this.
Metadata
Metadata
Assignees
Labels
No labels