<repo_name>gillstrom/brwsr<file_sep>/index.js
'use strict';

module.exports = function () {
	var browsers = {
		'Google Chrome': require('is-chrome'),
		'Internet Explorer': require('is-iexplorer'),
		'Microsoft Edge': require('is-edge')(),
		'Mozilla Firefox': require('is-firefox'),
		Opera: require('is-opera'),
		Safari: require('is-safari')
	};

	var ret = Object.keys(browsers).filter(function (key) {
		return browsers[key];
	});

	return ret.length ? ret[0] : null;
};
<file_sep>/readme.md
# brwsr

> Get current browser

*User agent sniffing is [considered](https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent) bad practice and should be avoided if possible.*


## Install

```
$ npm install --save brwsr
```


## Usage

```js
var brwsr = require('brwsr');

console.log(brwsr());
//=> 'Google Chrome'
```


## License

MIT © [<NAME>](http://github.com/gillstrom)
