platformenv
This is a microlibrary with a single function `platformenv.define(global)`, that sets a number of predicates on the global object:`isNodeJs`, `isDevServer`, `isTesting`, and maybe more in the future. Mainly used with solapp apps. Include as: `require("platformenv").define global if typeof isNodeJs != "boolean"` in coffeescript, to make sure it is optimised away in uglifyjs. (The whole reason to have a library that sets properties on the global object is that they can be optimised away, including dead code removal, by uglifyjs when they are defined by the preprocessor).
Security score
0 known advisories in v0.0.1
OpenSSF Scorecard 1.5/10
Weekly downloads
—
Unpacked size
—
Dependencies
1
Last publish
12 years ago
Security advisories
No known vulnerabilities affect v0.0.1.
OpenSSF ScorecardJul 27, 2026
- Code-Review0
- SAST0
- Binary-Artifacts10
- Maintained0
- CII-Best-Practices0
- Security-Policy0
- Fuzzing0
- License0
- Branch-Protection0