browser-process-platform
v0.1.1
Published
Browser shim for Node.js process.platform
Downloads
36
Readme
browser-process-platform
Browser shim for Node.js
process.platform
.
See documentation at nodejs.org.
Background
When running tests in Node.js as well as in the Browser, you might want to skip tests depending on the platform. With this shim it is possible to use process.platform
independent of the environment.
I’d like to thank @kumavis for his browser-process-hrtime module, it was a great inspiration to create this module.
Install
> npm install browser-process-platform
Usage
Via monkey-patching
process.platform = require('browser-process-platform')
console.log('The current platform is:', process.platform)
As module
const platform = require('browser-process-platform')
console.log('The current platform is:', platform)
Maintainers
Contribute
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct and follows the IPFS guidelines for JavaScript projects.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2018 Protocol Labs, Inc.