global-agent
global-agent copied to clipboard
Suggestion : remove "boolean" package dependency
The "boolean" dependency is quite light, but is also absolutely overkill. It is only used in one line, just to check that a env config matches some string values. I think it took more time to search for and include this package than code the desire behaviour.
The boolean package has been deprecated:
https://www.npmjs.com/package/boolean
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
boolean is not only now unsupported, also the repository link in the npm registry no longer works.
$ npm view boolean
[email protected] | MIT | deps: none | versions: 22
boolean converts lots of things to boolean.
https://github.com/thenativeweb/boolean#readme
DEPRECATED ⚠️ - Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
keywords: boolean, parser
dist
.tarball: https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz
.shasum: 9e5294af4e98314494cbb17979fa54ca159f116b
.integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==
.unpackedSize: 12.5 kB
maintainers:
- thenativeweb-admin <[email protected]>
dist-tags:
latest: 3.2.0
published over a year ago by thenativeweb-admin <[email protected]>
https://github.com/thenativeweb exists, but https://github.com/thenativeweb/boolean does not (HTTP 404 error).
Should be easy enough to replace, this is the whole module:
const boolean = function (value: any): boolean {
switch (Object.prototype.toString.call(value)) {
case '[object String]':
return [ 'true', 't', 'yes', 'y', 'on', '1' ].includes(value.trim().toLowerCase());
case '[object Number]':
return value.valueOf() === 1;
case '[object Boolean]':
return value.valueOf();
default:
return false;
}
};
use
npm install electron@latest