Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
51degrees
51degrees c-sdk native bindings for nodejs

51degrees c-sdk native bindings for nodejs, it helps you detect devices from userAgent in high performance.
.Parse(filename[, properties, options])filename {String} your 51degrees data, lite or premium.
properties {Array} optional, required properties
options {Object}
options.autoUpdate {Boolean} enable/disable autoUpdate feature
options.key {String} auto-update requires a licesen key from 51Degrees
options.interval {Integer}, default value 30 * 60 * 1000 (half hours)
options.onupdated {Function} if auto updated, you will get call at this function
for more information, you could move to 51degrees documentation
parser.parse(userAgent)userAgent {String}parse the userAgent given by you, and return result of that.
var Parser = require('51degrees').Parser;
var psr = new Parser('51Degrees-Lite.dat');
var userAgent = '...'; // your userAgent in any clients(browser/ios/android)
var ret = psr.parse(userAgent);
console.log(ret);
var psr = new Parser('51Degrees-Lite.dat', [], {
autoUpdate: true,
key: 'your license key'
});
Note: this feature only is used at pattern data.
After the above program, you will get:
{ Id: '17595-21721-21635-18092',
Canvas: true,
CssTransforms: true,
CssTransitions: true,
History: true,
Html5: true,
IndexedDB: true,
IsMobile: false,
Json: true,
PostMessage: true,
Svg: true,
TouchEvents: true,
WebWorkers: true,
method: 'trie',
data: {} }
.ALL_PROPERTIES51Degrees.node exposure ALL_PROPERTIES to shortly fetch all propertites from userAgent, just using like this:
var properties = require('51degrees').ALL_PROPERTIES;
var userAgent = '...' // your userAgent in any clients(browser/ios/android)
var psr = new Parser('51Degrees-Lite.trie', properties);
var ret = psr.parse(userAgent);
console.log(ret);
Then will print the whole properties, it's super useful for overview of this module and 51Degrees product.
The following list shows all properties that 51degrees would export in json:
AnimationTimingBlobBuilderCanvasCssBackgroundCssBorderImageCssCanvasCssColorCssColumnCssFlexboxCssFontCssImagesCssMediaQueriesCssMinMaxCssOverflowCssPositionCssTextCssTransformsCssTransitionsCssUIDataSetDataUrlDeviceOrientationFileReaderFileSaverFileWriterFormDataFullscreenGeoLocationHistoryHtml5Html-Media-CaptureIdIframeIndexedDBIsMobileJsonLayoutEngineMaskingPostMessageProgressPromptsScreenPixelsHeightScreenPixelsWidthSelectorSvgTouchEventsTrackVideoViewportWebWorkersXhr$ npm install 51degrees --save
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
nanEnvironment{
"local_name": "nan",
"alias": false,
"peer_metadata": null
} | ^1.3.0 | runtime |
tapeEnvironment{
"local_name": "tape",
"alias": false,
"peer_metadata": null
} | ^2.14.0 | development |
Source distribution
{
"shasum": "298a3bccf8893a9348ea1d4253a2e8298906fc28",
"tarball": "https://registry.npmjs.org/51degrees/-/51degrees-1.2.0.tgz",
"integrity": "sha512-tMCYGpRH4d5DGJmA/dkItHPOw9Rlm0L1VHe77UhGKPfNgfP8HHsTXUUZzkx/No+udS4zWxJPQwJ/UjlQoUw6+w==",
"signatures": [
{
"sig": "MEYCIQCzb3DHFki9iRuwhgvYzVgeRD5xiysNoGl9EOZtJ9DWCgIhAPjXerG1dMEANqn/r8IngEXPTbRzxmGSfg8ZCYJpqF90",
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
}
]
}Shared repository data · GitHub
Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:8a39328024be7bdebd820cd904d2acd610ccd5e9fe3cca737234f13b369c0c8a