bbc/melanite

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

melanite


User-Agent to TAL device identification.

For example usage see example.js

API
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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.