Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcello3d/node-bs
Browser specs
https://github.com/marcello3d/node-bs
Last synced: 15 days ago
JSON representation
Browser specs
- Host: GitHub
- URL: https://github.com/marcello3d/node-bs
- Owner: marcello3d
- License: zlib
- Created: 2013-02-23T22:48:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-02-24T03:37:31.000Z (over 11 years ago)
- Last Synced: 2024-10-18T15:06:16.795Z (29 days ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
Browser spec [![Build Status](https://travis-ci.org/marcello3d/node-bs.png)](https://travis-ci.org/marcello3d/node-bs)
=================Browser spec statically defines features for a given browser so you can make
Notes
-----This is intended for use with [node-shimmy](https://github.com/marcello3d/node-shimmy), and not really a standalone
module.Usage / Examples
----------------Browserspec takes an options object with a `family` and either a `version` string or trio of `major`, `minor`, and
`patch`:```js
var browserspec = require('bs')var spec = browserspec({ family:'Firefox', version: '3.6' })
spec['Array.prototype.forEach'] // truevar spec2 = browserspec({ family:'IE', major:7, minor:0 })
spec2['Array.prototype.forEach'] // false
```This makes it easily compatible with the [useragent](https://github.com/3rd-Eden/useragent) module:
```js
var browserspec = require('bs')
var useragent = require('useragent')var spec = browserspec(useragent.parse( useragent ))
```
License
-------
Open source software under the [zlib license](LICENSE).