Package Exports
- screen-info
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (screen-info) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
screen-info
A native multiplatform module to query the system OS for displays info.
Usage
Get current screen info & print it to console:
import Screen from '.';
const mainScreen = Screen.main();
console.log(`
Current screen size is ${mainScreen}
${mainScreen.width} pixels width,
${mainScreen.height} pixels height,
${mainScreen.colorDepth} bits per pixels
`);
This will output
Current screen size is 1920x1080x24
1920 pixels width,
1080 pixels height,
24 bits per pixels
API
main: () => {width:number, height: number, colorDepth: number}
return the size and color depth of default system display
all: () => [{width:number, height: number, colorDepth: number}]
return the size and color depth of all system displays
Install
With npm installed, run
$ npm install screen-info
See Also
License
MIT