Home

Awesome

electron-is

js-standard-style Build Status

An 'is' utility for Electron.
electron-is provides a set of isomorphic 'is' APIs, that you can use it both in main and renderer process.
See <a href="#usage">usage</a> for more information.

Install

$ npm install electron-is --save

API

The Mac versions are mapped as osx: darwin, you must pass the 9.x.y or 10.x.y OSX version as argument and not the darwin version.
If you are testing a Windows release you must pass the NT release, it can be x.y or x.y.build .

* Not implemented for Linux yet

<a name="usage"></a>

Usage

// es6
import is from 'electron-is'
// es5
const is = require('electron-is')
console.log(is.main())
<script>
    const is = require('electron-is')
    console.log(is.renderer())
</script>

Acknowledgements

electron-is makes use of electron-is-dev package from @sindresorhus.

Contributing

If you feel you can help in any way, be it with examples, extra testing, or new features please open a pull request or open an issue.

The code follows the Standard code style.
js-standard-style


License

MIT

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Copyright © 2016 Tomas Della Vedova