-
Notifications
You must be signed in to change notification settings - Fork 18
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.
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 to get this repo a bit more performant as i'm looking at adopting this repo for license checks in the Fastify org. I've already done a PR to resolve this in semver which is a dependency here: npm/node-semver#780
Metadata
Metadata
Assignees
Labels
No labels