An observable interface to the page visibility api
$ npm install --save observ-visibility
var Visible = require('observ-visibility')
var visibile = Visible()
visible()
//=> true
// switch tabs...
visible()
//=> false
Type: function
An optional function to call when the visibility state changes. If no value is provided, the current visibility state is returned. If a function is provided, an unlisten function is returned.
MIT © Ben Drucker