Name: melanite
Owner: BBC
Description: null
Created: 2016-10-27 16:00:54.0
Updated: 2018-01-24 09:54:24.0
Pushed: 2017-03-23 11:40:21.0
Homepage: null
Size: 20
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
User-Agent to TAL device identification.
For example usage see example.js
nite.match :: [matcher] -> userAgent -> device
Matcher:
brand: 'brand', // the brand of the device
model: 'model', // the model name of the device
invariant: [String], // substrings that will always be present
disallowed: [String], // substrings that can never be present
fuzzy: String // an example user agent that will be fuzzily matched, assuming that the invariants and disalloweds are met
type: String // the type of device, e.g. 'tv'.
...
Device:
brand: String, // the brand of the device
model: String, // the model name of the device
type: String, // the type of device