{"_id":"fiftyonedegreescore","_rev":"32-bba0a71bce7f363ea32cb8533b901625","name":"fiftyonedegreescore","dist-tags":{"beta":"3.3.1-beta","dev":"3.2.24-dev","latest":"3.2.24"},"versions":{"3.2.7":{"name":"fiftyonedegreescore","version":"3.2.7","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.7","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"44a2a2e6b1aa15ae068cd6513e8b01550391b9c2","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.7.tgz","integrity":"sha512-ji7Zzutev26flOY06l7NDUo7y0c/7m7dqfYvNZq8KB/Fomj9a8EaMeMrFPGirP3/UdvYarWtVh5q1tyOAeqsbg==","signatures":[{"sig":"MEYCIQC46pqR06anUCq94XCXSjQNBr6Oit7ZSslrU8iYbMd1qQIhALo489U8cs41Fn0xBV7SCwlT+cihmqVXfKTKwuGlNbnR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"44a2a2e6b1aa15ae068cd6513e8b01550391b9c2","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.7","fiftyonedegreeslitepattern":">=3.2.7"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.7.tgz_1471539111854_0.4358963379636407","host":"packages-16-east.internal.npmjs.com"}},"3.2.8":{"name":"fiftyonedegreescore","version":"3.2.8","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.8","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"6442b7391e1481a5421ceb609b88f8acabe8b2bb","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.8.tgz","integrity":"sha512-wRZKt7/IwkQrWLIhncCKuymLKOUPX5rHRxpYC+L67ne+4qm4FYivhyTD2LmwSP88Gd2NGjU4ppVfWEK4qWxv6g==","signatures":[{"sig":"MEUCIQDeBc1iihAlLkwwabOBBQj1Np9Ra6yRu3C9pXRzy675+gIgQTBACCMrAnO7MBBneNiNHI19o9c0gdn5cqSdUhGKOsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"6442b7391e1481a5421ceb609b88f8acabe8b2bb","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.7","fiftyonedegreeslitepattern":">=3.2.7"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.8.tgz_1472220518510_0.8064642269164324","host":"packages-16-east.internal.npmjs.com"}},"3.2.9":{"name":"fiftyonedegreescore","version":"3.2.9","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.9","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"1a32dc916aad8ff70bf58b44555ffb84eab2cca9","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.9.tgz","integrity":"sha512-LK1jn0pTmJD0lL7MeYgTqiXCezdIuGhkfoDnFDeiWiR0IT7VANzSePgbjccEA7hEZQrcaEzgQWHa5UbD1GiCOg==","signatures":[{"sig":"MEUCIQCxJft9keykwhnCngXHISmNT2NLfEo7msK0X0A762+UkQIgPjlSvCCNwTwhsTzZ5fQAqirnYdoXeCBkjsRU3VG9GnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"1a32dc916aad8ff70bf58b44555ffb84eab2cca9","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.8.6","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.12.0","dependencies":{"fiftyonedegreeslitetrie":">=3.2.8","fiftyonedegreeslitepattern":">=3.2.8"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.9.tgz_1474017217331_0.49690993246622384","host":"packages-16-east.internal.npmjs.com"}},"3.2.10":{"name":"fiftyonedegreescore","version":"3.2.10","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.10","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"cce0b0713026509ac9c0307ebd4bf57261308906","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.10.tgz","integrity":"sha512-njHy8NWROPLwgwPWw41oiacnOJt2H4N36rwcjZh2+Xt6MH3rNE+VmkGI/eBdNFpGpN1NB4IIFjUNC4g6O087vQ==","signatures":[{"sig":"MEUCIQCSuv2qX5vSw1YRk0lt9zmhyJCyOMYSVlBqoaqBYz1DtgIgEVXPsiyf6bExOQuhKnc0q/R1AWk4OAxL2PXl4eO13qA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"cce0b0713026509ac9c0307ebd4bf57261308906","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.8","fiftyonedegreeslitepattern":">=3.2.8"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.10.tgz_1474278935121_0.8174887842033058","host":"packages-16-east.internal.npmjs.com"}},"3.2.11":{"name":"fiftyonedegreescore","version":"3.2.11","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.11","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"baa1ba588f57ad5c4b7b4f20ca5348bd3093c928","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.11.tgz","integrity":"sha512-rQYKPE3o2DRJPmm6W0JWDi59LrPJwmwd+RiD2L3lJSANNKJPAzlXaR89HbS//ggGfbpS+QbEPVHify3qGtmb9w==","signatures":[{"sig":"MEUCIEjRbOjT4PrUM5NjZMwis2uduJ7qa41jLIo3uuIueZodAiEAi5dk69O+UajWsktvARvkSVumfkyWsT/JP0VQv1pNUTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"baa1ba588f57ad5c4b7b4f20ca5348bd3093c928","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.9","fiftyonedegreeslitepattern":">=3.2.9"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.11.tgz_1477660102507_0.7074355764780194","host":"packages-18-east.internal.npmjs.com"}},"3.2.12":{"name":"fiftyonedegreescore","version":"3.2.12","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.12","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"b879c4a940aeb2e94e6a7493060e90c795bc86f1","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.12.tgz","integrity":"sha512-DNuMHa25QM5qBnsb8FV3rXSxgrFuvNyRs0UQy/x02oWqvXbRxmhA6+e9zHV33Hd6eVFaSmogogAUeAfTvlw2yQ==","signatures":[{"sig":"MEUCIQDSWDXPkEtdKc8sBglkb5+wlHQ81CpCvwBftCUNEqrU1wIgK8C4VCX1Pp0JW0KfAnYhBZ/XQToqGDrYVkUJuXxHTxg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"b879c4a940aeb2e94e6a7493060e90c795bc86f1","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.10","fiftyonedegreeslitepattern":">=3.2.10"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.12.tgz_1481887109245_0.17383518512360752","host":"packages-18-east.internal.npmjs.com"}},"3.2.13":{"name":"fiftyonedegreescore","version":"3.2.13","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.13","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"78cd1c4784400458f697eef518e1020aee5550f4","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.13.tgz","integrity":"sha512-r3iTVwMBu7jQ96nh9/vyjdmbrDPABu5BHqWhd+Ymz48IunmVZJ8Ju5qIbrmE8lCtkUvM1g0l1XGMcVOv56wiRg==","signatures":[{"sig":"MEYCIQDzDb2sbghTf4+0yyLvb95cbuD+6jW9earKcGOMlpUZBwIhAIcCbF3EapkyHcQ2n9j3mDYMi2IY+Kk/lAy2+PUkebwU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"78cd1c4784400458f697eef518e1020aee5550f4","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.10.10","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"6.9.5","dependencies":{"fiftyonedegreeslitetrie":">=3.2.10","fiftyonedegreeslitepattern":">=3.2.10"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.13.tgz_1489072723061_0.8314715404994786","host":"packages-18-east.internal.npmjs.com"}},"3.2.14":{"name":"fiftyonedegreescore","version":"3.2.14","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.14","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"7260d631a3b0a48cd1a8aadc3209034c8aa6cbfe","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.14.tgz","integrity":"sha512-U1eeqHluwLVCm/maoqwWtrrVEira5oXaInxTW+kMLMCYh98oojwNCcqR7Hs526iewCNG1Q9gbIXf7mMpXpZ65Q==","signatures":[{"sig":"MEQCIB8vEUCqbgYqoKf/Op9hmX3h8E9SrICUxc3LXhMxefNlAiBfdSGoJ0vJGzxSpvtIomBa+e5BUXk2xlarB/zZIL+omA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"7260d631a3b0a48cd1a8aadc3209034c8aa6cbfe","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.12","fiftyonedegreeslitepattern":">=3.2.12"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.14.tgz_1493288826239_0.44994405773468316","host":"packages-12-west.internal.npmjs.com"}},"3.2.15":{"name":"fiftyonedegreescore","version":"3.2.15","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.15","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"e81c010042ccfb5e28909fbdf2aa2b98d3d1f729","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.15.tgz","integrity":"sha512-O71RY4HL0OkkPubt8wg+diLcNS/ESWMCEeQzI5IxVpbI1nOWxdB2bGX89+CpobT818jY4jn6a+/u3vIgjCC5Nw==","signatures":[{"sig":"MEYCIQCmYWufVg28mxiDtZJVLu+fx8AP5f7fxlMJ0qE2BXRopQIhAK4Bs1pi2et/KXAwCuT59+GOs068osaKwHHuaRxs3LJp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"e81c010042ccfb5e28909fbdf2aa2b98d3d1f729","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.13","fiftyonedegreeslitepattern":">=3.2.13"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.15.tgz_1496396802907_0.6380396902095526","host":"s3://npm-registry-packages"}},"3.2.16":{"name":"fiftyonedegreescore","version":"3.2.16","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.16","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"3e29c2563fe17b21b8d66dd749014b72cd2c5d11","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.16.tgz","integrity":"sha512-4OLF51owa74V6WtYkhgxbwH/ygmOrQs3WoRFUPqFEBa2ba29QE7YR3nQjsUo7drOHVka6OKM7hvR0I7j75p1EQ==","signatures":[{"sig":"MEQCIFFI5FZMXXd7EhJUfy7aOzPj53kvTZYIWFHs6wI0igSmAiB+R4iOk0wb1gjUuyWNhC6F0qMmosBtRHCF4Lcfg7vYSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":"fiftyonedegreescore","_shasum":"3e29c2563fe17b21b8d66dd749014b72cd2c5d11","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node gccCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"_resolved":"file:fiftyonedegreescore","repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitepattern":">=3.2.13"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.16.tgz_1499100776193_0.3032931804191321","host":"s3://npm-registry-packages"}},"3.2.17":{"name":"fiftyonedegreescore","version":"3.2.17","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.17","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"2db686c35032c56f0e5ba12bb76763279bd0e032","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.17.tgz","integrity":"sha512-NGrMUDuiJ9GauF9NhFnCiRR7unIGsMGCYXGxXEvqqut02vM0RrjaN8MbIMkKWY9B3wriWK4yDD4Cl+VJjTnW8A==","signatures":[{"sig":"MEUCICFebiJzEzv36ExZlraNjYDjZZCCSxK9EHQjZU95V39IAiEAzc9JR+xNo0bNGBE84PUlF/Ua/aBgNDMcuM4Vj9eKxiI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_from":".","_shasum":"2db686c35032c56f0e5ba12bb76763279bd0e032","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.7.3","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"5.9.1","dependencies":{"fiftyonedegreeslitetrie":">=3.2.13","fiftyonedegreeslitepattern":">=3.2.13"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.17.tgz_1505317325349_0.8809786273632199","host":"s3://npm-registry-packages"}},"3.2.18-dev":{"name":"fiftyonedegreescore","version":"3.2.18-dev","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.18-dev","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"e108b00f2a0ac9de37b826a74ab84563f503af7a","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.18-dev.tgz","integrity":"sha512-kZ06yDRv8zH46WmvkSA/su/wOGX1l59EDhM+QPQ6ljU0Oq7u7h4+2WrcpDPqFiv2TJO9KEsDr+OzLz3sVjwp/Q==","signatures":[{"sig":"MEQCIAKqBfebugOjMm+/oe60+XVqG6kaVus+Sfmiob3J1Gq2AiBaXyjOtTDXyd/mo1ql2Bbp9BUOSIXb/uhxoa4X/PpFVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"5.3.0","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.3.0","dependencies":{"fiftyonedegreeslitetrie":">=3.2.13","fiftyonedegreeslitepattern":">=3.2.13"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.18-dev.tgz_1505380700370_0.8772931429557502","host":"s3://npm-registry-packages"}},"3.2.18":{"name":"fiftyonedegreescore","version":"3.2.18","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.18","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"a033efb2a7cb2061f44dd3bd885cd0f349f9b9be","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.18.tgz","integrity":"sha512-J8ev6UxwWBnoDQbn3UpMlpuiLcctQXgvtUx6PWjM/GlWIa3q6JZhWAfPhOnocbidqPRpW4+JkAqiMiO3q3e1sw==","signatures":[{"sig":"MEUCIQC/gHhVjnhc+pmYg7afY2aisnTrM0Inm5VNhbCfNymucAIgDZEZzifbD8HIJPqg+sJ6GRQnq2pcP23x1MhcoIAvX3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"fiftyonedegreescore.js","_args":[[{"raw":"./fiftyonedegreescore/","name":null,"spec":"/home/joe/Device-Detection-release-testing/node.js/fiftyonedegreescore","type":"directory","scope":null,"rawSpec":"./fiftyonedegreescore/","escapedName":null},"/home/joe/Device-Detection-release-testing/node.js"]],"_from":"node_modules/fiftyonedegreescore","_spec":"./fiftyonedegreescore/","_where":"/home/joe/Device-Detection-release-testing/node.js","_shasum":"a033efb2a7cb2061f44dd3bd885cd0f349f9b9be","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_inCache":true,"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"_location":"/fiftyonedegreescore","_resolved":"file:node_modules/fiftyonedegreescore","_requested":{"raw":"./fiftyonedegreescore/","name":null,"spec":"/home/joe/Device-Detection-release-testing/node.js/fiftyonedegreescore","type":"directory","scope":null,"rawSpec":"./fiftyonedegreescore/","escapedName":null},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.10.10","_requiredBy":["#USER"],"_shrinkwrap":null,"description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"6.12.0","dependencies":{"fiftyonedegreeslitetrie":">=3.2.13","fiftyonedegreeslitepattern":">=3.2.13"},"devDependencies":{},"_phantomChildren":{},"optionalDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore-3.2.18.tgz_1512060424518_0.047723778523504734","host":"s3://npm-registry-packages"}},"3.2.19":{"name":"fiftyonedegreescore","version":"3.2.19","author":{"name":"Ben Shillito","email":"Ben@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.19","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"9cc7e01c254299b606133a9a8b670a2dda1f5099","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.19.tgz","fileCount":31,"integrity":"sha512-lplZavsWlLCE2EoKLbNFedPxY1GVV/p+xRaDUVF+i8S3S1Y+d2MLzuR+qPdKe9hkTMeK08NdU07Jn8GD9S1DAg==","signatures":[{"sig":"MEQCIC6phYwGLDUsgyRsMHISgl8x6yIxl4591pEV3I89Otf4AiA+GGNzIiaBUtKqHTigL/gxOe/MYaH7DEoNgoYpSkPQGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":977063},"main":"fiftyonedegreescore.js","_from":".","_shasum":"9cc7e01c254299b606133a9a8b670a2dda1f5099","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.10.10","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"6.14.3","dependencies":{"fiftyonedegreeslitetrie":">=3.2.19","fiftyonedegreeslitepattern":">=3.2.19"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.19_1530888549080_0.8680485503968427","host":"s3://npm-registry-packages"}},"3.2.20":{"name":"fiftyonedegreescore","version":"3.2.20","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.20","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"0cf8de8680adfdc80bde6daa33a2a825a42f6a6b","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.20.tgz","fileCount":29,"integrity":"sha512-TyaYp+4V9mA4fSWhORrwskyNiBslApE/0pYEs3Dhp7LG/Dq60r+CimUAXIRRscKFVlbzlcuqL92Mkrn1Id77lA==","signatures":[{"sig":"MEYCIQD4MCEFEuwEek+i7iYjQ2KyA8LIAlPnfvC3I/KGZzmGlwIhALxUW0lcnyp2G2fKuHq6xzXg7WPNbihmTr5KDG96VIGx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":986898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgEGnCRA9TVsSAnZWagAAY9IQAIJxGfNxFefgBSQ4kdQA\ntlJNX/wMPYu+lSgDLJYSDjm0XJtfy11QJ3st+PcqvaqpZHVzzXiwPanMPjzr\nSGct6u4FhaBqShToBaSdq23eFJwDicIDMCyl78J+LeBE6ZDmdlrMm6UsTY1R\neQ7JNyJjKg9i68CkCXKtWTIe6b3o7fwLiqYA9fF6hC4nIhOmS8Ai+BgwzHth\niRr/meTmDNGi46b4Us2PN0nGxH6tZ1qffhz72RKsD+xHfz5yolwNcc5jXf1l\nWXOyCxuuc3LjGsNkL9HQgzeLbn4Un0L2V6H5Cpfuu6jo6FNOieYM2Oli5td2\nmwxJ7sok/+eBMfnYWNYkjC33llaoDa3EPU9pHMbQTC3/wW+nMNcj0eYwflHZ\n6TXQ4TfTM1d8UnQNbUPHffqtvtoW+L0DUcjxDNdO9nABDUUnXOKv6hJIrhI9\nCRekFPKEu53D/Q7jMPnMuilJh0vef09dvADERvgurI/duzPLzYLQSm50EuIs\nJqTX7qGfLVl+rKuxOpQvUgw/7Jw9J9zRP9JkJsAa4t29GXyYQQa7EqP18zxU\naO/9yGUza3rS90FTnUID8vzNNObJGZX1AKtvJ7Qy4dpzbtFaHKp8pOwm8qWv\n8wHAJRBq1qj8g+W+16dTpgQK0vs2M1r8U2ls35dxXyDmx+WWC/vjapXiKxTi\nnY+G\r\n=mjVN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"5.6.0","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.11.4","dependencies":{"fiftyonedegreeslitetrie":">=3.2.20","fiftyonedegreeslitepattern":">=3.2.20"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.20_1535132070408_0.9681164726719611","host":"s3://npm-registry-packages"}},"3.3.1-beta":{"name":"fiftyonedegreescore","version":"3.3.1-beta","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.3.1-beta","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"3b4234ca2bd63357effbd412d85010f9992af0b8","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.3.1-beta.tgz","fileCount":30,"integrity":"sha512-rblHRzMCssiZ+OlqNlj2kATuVTEs6gJKjn56HJadLPLR2Ce7/SvxiuylRG21Dj4RU6U/LlFKL+TyVRIPLui7Nw==","signatures":[{"sig":"MEYCIQCjP208T8hm8uLO1vj3CeIW9m+nwu3iV1l+VZngfcyMUAIhAOKFxidk9mBhYgr7Tez7dVbZgI7KNedmdKpqbCZBm8No","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":987944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiWYUCRA9TVsSAnZWagAANocP/3VcC4UoV6DClpHGINeG\naxELmaHq2TR/pBBwAgi6KPwv0tzgOf2PjBnwyNWI4Ytg1Tz5KkjppcWWGkd7\nveohWx1ZxK2xGlw8uLsHrxNQndRej/NTBR/u694I0aoODxSXV4GC0HN9gheU\nFHd3LaqiydE4qT6Po4VGL7iFWmfB8HoLIFJhlbu1Bhta3mIVX6X6GlRmOvH6\nqYBSGQGrIxzKrfvfrOiw8EBt8tZc9PXH3Cf+HwOzFjrpPepNl05XJUBuodxm\no2EetJWd4kGEc+4+v02XRvpZgxxhYlK0GLnKg+Ex2HT2CMxpCIA3S/nJ3pwT\nc+4Of41nYW78uG+5JPKuumnEN8vCEs0yYv+a4GJt60L4xQFX684iTVZ+1qjg\nXBPVELYxuAgEACAQzMBTz23D+fthWa7FEKjMulObrg7DD3QT4aVCR295/Nqt\nU28A582udWgyOxJom9TNzj6K5oeizXOYNKrUeCWMB9p6uhxwArhh3eXdlonI\nV/U+XaljFrOd5rrXo7hoYcwiZOGmPNVtGRPIP6n5jPHmG5R3LZQncG0X8Y0l\nwZPIm/x6+phxqS+f/3TixciUmFwAcpuTCp1xyVwY9bZsYGtPc9R7RRik2Pj2\nPOV0YqA9RQZUHJFUFdGufUrYEZGdJ8Mip9PhNTiF2tIuq/D0zb1TyllyEG3R\nM0kU\r\n=NzaF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","_from":".","readme":"![51Degrees](https://51degrees.com/DesktopModules/FiftyOne/Distributor/Logo.ashx?utm_source=NPM&utm_medium=package&utm_content=readme_main&utm_campaign=node-open-source \"THE Fastest and Most Accurate Device Detection\") **Device Detection in C** Node.js wrapper\n\n[Supported Databases](https://51degrees.com/compare-data-options?utm_source=NPM&utm_medium=package&utm_content=compare-data-options&utm_campaign=node-open-source \"Different device databases which can be used with 51Degrees device detection\") | [Developer Documention](https://51degrees.com/support/documentation?utm_source=NPM&utm_medium=package&utm_content=documentation&utm_campaign=node-open-source \"Full getting started guide and advanced developer documentation\") | [Available Properties](https://51degrees.com/resources/property-dictionary?utm_source=NPM&utm_medium=package&utm_content=property_dictionary&utm_campaign=node-open-source \"View all available properties and values\")\n\n<sup>Need [.NET](https://NPM.com/51Degrees/.NET-Device-Detection \"THE Fastest and most Accurate device detection for .NET\") | [Java](https://NPM.com/51Degrees/Java-Device-Detection \"THE Fastest and most Accurate device detection for Java\") | [PHP Script](https://NPM.com/51Degrees/51Degrees-PHP)?</sup>\n\n## Node 3.3 - Beta\nImportant note - As of this version fiftyonedegreescore no longer has a dependency on fiftyonedegreeslitepattern or fiftyonedegreeslitetrie. They will now need to be installed separately. This is to prevent data files using up unnecessary disk space that you might not be using.\n\nIf installing locally then our current examples that `require` these dependencies will still work fine.\n\nAdditional features:\n- Added the option for Eager Loading which will populate the match object with values directly. \nuse like...\n```js\nvar config = {\"eagerLoading\" : true};\n```\n- Added EagerLoading and EagerLoadingTrie examples, available within our NPM package.\n\n## Introduction\nUse this project with core node.js, HTTP module or Express to detect device properties using HTTP browser User-Agents as input. It can be used to process server web log files, or for real time device detection to support web optimisation. The module takes a User-Agent string, HTTP header array or HTTP request object and returns a Match object ontaining properties relating to the device's hardware, software and browser.\n\nIn Node, use like...\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\nvar provider = new fiftyonedegrees.provider(config);\nvar match = provider.getMatch(userAgent);\nconsole.log(match['IsMobile']);\nconsole.log(match['DeviceType']);\nmatch.close();\n```\n... to turn User-Agent HTTP headers into useful information about physical screen size, device price and type of device.\n\nTwo detection methods are supported.\n\n**Pattern:**  Searches for device signatures in a useragent returning metrics about the validity of the results. Does NOT use regular expressions.\n\n**Trie:** A large binary Trie (pronounced Try) populated with User-Agent signatures. Very fast.\n\nAll methods use an external data file which can easilly be updated.\n\n## Dependencies\n\n#### Essential\n- node.js (https://nodejs.org/en/download/package-manager/)\n- node-gyp (https://NPM.com/nodejs/node-gyp)\n- gcc/g++ >=4.7 *or* Visual C++ Build tools\n\n## Install\nInstall the core 51Degrees module with:\n```\n$ npm install fiftyonedegreescore\n```\nThis will also install Pattern and Trie Lite data files as dependencies.\n\n### Windows\nNode has know issues installing modules in Windows. Three things must be in place before installing.\n1. Install Visual C++ Build Tools\n2. Install Python 2.7 and run ``npm config set python python2.7``\n3. Open a terminal and run ``npm config set msvs_version 2015``\n\nAlternatively, Microsoft have offered an npm package to install all this and can be run (in an elevated Power Shell) with ``npm install -g windows-build-tools``.\n\nFull explanation of windows issues can be found at https://NPM.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md\n\nWhen you're done installing, check it's set up correctly by recreating the output in the Usage section below. Or if you've cloned this package, try the examples.\n\n### NPM\nIf installing from the NPM package, the source should be coppied before installing.\n\nMove to the node.js directory with\n```\n$ cd Device-Detection/node.js\n```\ncopy the source and data files to the fiftyonedegreescore directory with\n```\n$ node copySource.js\n```\ninstall the local packages in order with\n```\n$ npm install ./fiftyonedegreeslitepattern\n$ npm install ./fiftyonedegreeslitetrie\n$ npm install ./fiftyonedegreescore\n```\n\n## Configure\nThe config json object is where all the settings can be changed, it is also possible to initialise the provider a path to a .json file in the same format.\n\nThe most basic example using just a data file  can be seen below:\n```js\nvar pattern = require('fiftyonedegreeslitepattern');\nvar trie = require('fiftyonedegreeslitetrie');\n\nvar config = {\"dataFile\" : pattern};\n\nvar provider = new fiftyonedegreescore(config);\n```\n### Settings\n\n#### General Settings\n - String ``dataFile``. (defaults to the ``fiftyonedegreeslitepattern`` package). Path to a Pattern or Trie database file.\n \n - String ``properties`` (defaults to all available). Comma separated list of case-sensitive property names to be fetched on every device detection. Leave empty to fetch all available properties.\n\n - String ``License``. Your 51Degrees license key. This is required if you want to set up the automatic package updates.\n \n#### Pattern Specific Settings\n - Integer ``cacheSize`` (defaults to ``10000``). Sets the size of the workset cache.\n\n - Integer ``poolSize`` (defaults to ``20``). Sets the size of the workset pool.\n\n#### Usage Sharer Settings\n - Boolean ``UsageSharingEnabled`` (defaults to ``true``). Indicates if usage data should be shared with 51Degrees.com. We recommended leaving this value unchanged to ensure we're improving the performance and accuracy of the solution. If this is enabled, you may need to allow HTTPS traffic to the 51Degrees address.\n \n#### Interface Settings\n - Boolean ``setGetters`` (defaults to ``true``). Indicates whether getters are set for the match object so that ``match.IsMobile`` can be used in place of ``match.getValue('IsMobile')``. This makes things simpler when using properties that can return an array of values.\n \n - Boolean ``stronglyTyped`` (defaults to ``true``). Indicates whether the match getters return boolean values as a string (``True``/``False``) or a boolean type (``true``/``false``).\n\n - Boolean ``eagerLoading`` (defaults to ``false``). Indicates whether the match will populate the match object with values directly.\n \n#### Automatic updates\nIf you want to set up automatic updates, add your license key to your settings and the provider will automatically update the data file whenvever a new one is available. This will replace the file in the location it has been loaded from when the provider was initialised.\n\nFor Lite users, the data file can be updated by updating the Lite data package (either ``fiftyonedegreeslitepattern`` or ``fiftyonedegreeslitetrie``).\n\nFor more information on data options, see https://51degrees.com/compare-data-options\n\n## Usage\nTo check everything is set up , try fetching a match, load the module and start matching with\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\n\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern'),\n              'properties' : 'BrowserName,ScreenPixelsWidth'};\n\nvar provider = fiftyonedegrees.provider(config);\n\nvar device = provider.getMatch(\"Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176\");\n\nconsole.log(device.Id);\nconsole.log(device.BrowserName);\nconsole.log(device.ScreenPixelsWidth);\n\ndevice.close();\n```\nwhich will output:\n```\n15767-18117-17776-18092\nMobileSafari\n1024\n```\n\n#### Provider\nThe provider is initialised with config object or file path as detailed in the configuration section above. This is done with:\n```js\nvar fiftyonedegreescore = require('fiftyonedegreescore');\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern')};\nvar provider = new fiftyonedegreescore.provider(config);\n```\n\n#### Match\nUsing the provider's ``getMatch`` function with a User-Agent string returns a match object from which the properties of the device can be extracted:\n```js\nvar userAgent = '[User-Agent String]';\nvar match = provider.getMatch(userAgent);\nvar isMobile = match.IsMobile;\n\nmatch.close();\n```\nThe ``close`` method must be called when the Match object is no longer needed to release it back to the provider's pool for reuse.\n\n##### Muliple HTTP Headers\nA match can also be carried out on multiple HTTP headers in the same way, where instead of passing in a User-Agent string, a JSON object containing the headers is used like\n```js\nvar headers = {'user-agent': userAgent,\n               etc...\n               };\nvar match = provider.getMatch(headers);\nmatch.close();\n```\n\n##### HTTP Request\nWhen used in an HTTP server the request object can be used. Using this method means that the match object is closed when the request ends so there is no need to implement ``match.close()``. The match object is also attached to the request as ``fiftyoneDevice`` when ``getMatch()`` is called so can be accessed in one of two ways:\n\n1. The same as with a match outside of an HTTP server\n```js\nvar match = provider.getMatch(request);\nvar isMobile = match.IsMobile;\n```\n2. Through the request object\n```js\nprovider.getMatch(request);\nvar isMobile = request.fiftyoneDevice.IsMobile;\n```\n\n#### Examples\nIn the examples folder, you can find examples of various functionalities that the 51Degrees detector has such as:\n- Matching with a User-Agent\n- Matching with a device id\n- Evaluating match metrics\n- Offline processing\n- Strongly typed variables\n- Finding profiles\n\nFull example documentation can be found at https://51Degrees.com/Support/Documentation/APIs/Nodejs-V32/Tutorials\n\n#### Example Server\nThe example **server.js** runs a server at localhost:8080 by default and returns matches from the web browsers User-Agent and all relevant HTTP headers seperately. Is run with\n```\n$ node examples/server.js pattern\n```\nor\n```\n$ node examples/server.js trie\n```\n\n#### Http and Express\nThere are also simple HTTP and express server examples. These can be run with\n```\n$ node examples/client.js \n```\nand \n```\n$ node examples/expressClient.js\n```\n\n##### expressClient.js dependencies\n- express (https://expressjs.com/en/starter/installing.html)\n\n\n### Logging\nLog events are emitted via ``fiftyonedegreescore.log`` with the possible events being **error**, **info** and **debug**. A function can be attached to any of these events in the expected way like\n```js\nfiftyonedegreescore.log.on('error', function(err) {\n    // Oh no, an error!\n    console.log(err);\n})\n```\nto print the an error.\n\n**NOTE: if the ``error`` event is not listened for, node will treat it as a full blown error and exit the process. So be sure to add the above function as a minimum.**\n\n### Tests\nAPI and performance tests can be run from the module directory with either\n```\n$ mocha test.js --pattern\n```\nor\n```\n$ mocha test.js --trie\n```\n\n##### Test dependencies\n- mocha (https://mochajs.org/#installation)\n","_shasum":"3b4234ca2bd63357effbd412d85010f9992af0b8","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.5.2","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.3.1-beta_1535731220076_0.5036413006854707","host":"s3://npm-registry-packages"}},"3.2.21":{"name":"fiftyonedegreescore","version":"3.2.21","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.21","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"6579e054a548be30bffd26433ef38f03652c50db","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.21.tgz","fileCount":30,"integrity":"sha512-owN6+JFBRpDTMbgW0lRz8XFkE6pLoZ6teYuzjybzX0D8/VmLgT1EhwVQheKJcXIQoTj2zGFOMJgd/xb8cofpsg==","signatures":[{"sig":"MEYCIQD7bjSQOALksGEa34bkg53/t/X7+LCuJ/wuCIvgRr4QsgIhAKxuGhg3E5pMbODQV5QcXVu8h3w4bg2fLJnSO3RRyy+T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":987063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6Y9KCRA9TVsSAnZWagAAA7MP/iXqdaqYOLvTTGmTHsYy\nJy9BV9wNoXw3S1QPxudfAaVzFUW2fEvx93JZe4R7SMvDO728SEXRusO+PVlb\nJmXbyL+ev2to8Lwv3Rj0HowKSblYc7m4lmX6cV4tcS71DRc17rbNg2eGUsOI\nSTjVaruNxExWmwHvpMBNQYCG4J714JoDgw0RypQJL507L/rY/hQXyIMjZK+8\n/4FjAf4eCioJvoKYop+4N2OoK6tN64vAq6NvCBdZL8cvWWeXoPG3RLl0bgxl\n/a12bxHlbR/m0S/eXcyH3MJMxaN8I7d03DMrCul9HrzZBkenR7OPducuRXwV\nuegtJpm1Q/V2NPCryCNOsF1WIhuq+5zev/HHW7hBfnqm7kN/Jo+fZKS+E8sT\nTUBM7ci2aU8/o1xPylsF0ErW0H2gRHK7ptxuj4ZaTsF44LcBxLQ26l2qfdVW\nJyXUaBbNgh1YJd3EnBYCsNV2EhBbEZCSCFRn0hNElMfVW3QhQbwZ6xkB3wDy\nkoCNaOFNtdclCm/341Ef8s5idBYRvg2ndSWzMYK0GTUi4tbd1KghPgLpDsN6\nfI57I+j3GCNOgL0Ymko7OWiQPBaQLJ5E5/UIM/cqVTm8HIDJH/2TrE+T7v3o\nTlbVHYcaW9quKQe7uJfU32VIWfu1Y36MFBY+/HHETqZQK7yJswpPLhrj3Khy\nhziA\r\n=zrhK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","_from":".","_shasum":"6579e054a548be30bffd26433ef38f03652c50db","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.5.2","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.10.0","dependencies":{"fiftyonedegreeslitetrie":">=3.2.20","fiftyonedegreeslitepattern":">=3.2.20"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.21_1542033225316_0.9634382561149728","host":"s3://npm-registry-packages"}},"3.2.22-dev":{"name":"fiftyonedegreescore","version":"3.2.22-dev","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.22-dev","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"55523a2d1deedb94c5cdddead4a37a20a2eed083","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.22-dev.tgz","fileCount":30,"integrity":"sha512-yrA2DJp1bgt44g+mHmCgQjOKDNRGbu4g8GuTJn13qWVl5EIyDT/lmvPqkG6yGglI14fRtKM5M5kHw2vxMUHJTQ==","signatures":[{"sig":"MEYCIQCGhfN1C1lPjOLxDDpQj/aOMOkMDS4qx5cFXFFvmwoSZAIhANn9lxoExpFUQhtP4YB6NjD96hqsvsg3LTtXHQr2tuiF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/sT0CRA9TVsSAnZWagAAObkP/3sukmCqU4YRywxq5SEA\nKLFlodGi5b5NrOR7EQGmmROHeF/S3YC4rzyvcGI4HPX+7vvSD2tprFptoewW\n6+ij9okQssbYbLZrBjhv3CaCWlIL/5zXi5CuSorg15GeMcJdNNT1O4z2r8O9\ncy+jjwEMmitwFgUJbPs1Ty9n4pImTK7msZmIra6P194S59HXBk8VXGzN//3t\nkJRsz9/7ZbUIQgsq8oxzLiu2U+M5Bj5GgVL34xTdRMSc5/a+aNUbYLkUJ2o6\nvFDw2PEesorSddr2FusNWLohrOs3LMHE1jj2INfiNXFuv+0ByWMlrroNFYTB\n7iXDo48wylU6cCQqBNmTHVOyk0eZMHjPyjjkfDTPbVeW21iy11R7wIVw70eR\neHbv+NRC3XdALA47qDWr9871eL5tMcROhI+Cjik4tr48AL817kp1hQEbp4u2\nJ3ohIkXwjJp3bEe8IQ9diSDZx9/0YOAOJYyE1KnTkmk1oAZhRJa0oERfE6xg\n9BD2UEZqyvqOY9fX3x8RwhSc+I3RryUFM+KpSyZD5mHvh4NTqn5LMmAjONOj\nJbRCnXN4XSNzAFdX8/64cm0rPMOtu6nifKHCa6YE+A8RKr/X3UK6s/Qi3rh0\nncAvD7Vv4zA+6tJyGgipc/9+cJlbyT2px5YRVpZTu41ZWpP+PHl8UGbYPnCY\ngY8v\r\n=bzUR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","_from":".","readme":"![51Degrees](https://51degrees.com/DesktopModules/FiftyOne/Distributor/Logo.ashx?utm_source=NPM&utm_medium=package&utm_content=readme_main&utm_campaign=node-open-source \"THE Fastest and Most Accurate Device Detection\") **Device Detection in C** Node.js wrapper\n\n[Supported Databases](https://51degrees.com/compare-data-options?utm_source=NPM&utm_medium=package&utm_content=compare-data-options&utm_campaign=node-open-source \"Different device databases which can be used with 51Degrees device detection\") | [Developer Documention](https://51degrees.com/support/documentation?utm_source=NPM&utm_medium=package&utm_content=documentation&utm_campaign=node-open-source \"Full getting started guide and advanced developer documentation\") | [Available Properties](https://51degrees.com/resources/property-dictionary?utm_source=github&utm_medium=repository&utm_content=property_dictionary&utm_campaign=node-open-source \"View all available properties and values\")\n\n<sup>Need [.NET](https://github.com/51Degrees/.NET-Device-Detection \"THE Fastest and most Accurate device detection for .NET\") | [Java](https://github.com/51Degrees/Java-Device-Detection \"THE Fastest and most Accurate device detection for Java\") | [PHP Script](https://github.com/51Degrees/51Degrees-PHP)?</sup>\n\n## Introduction\nUse this project with core node.js, HTTP module or Express to detect device properties using HTTP browser User-Agents as input. It can be used to process server web log files, or for real time device detection to support web optimisation. The module takes a User-Agent string, HTTP header array or HTTP request object and returns a Match object ontaining properties relating to the device's hardware, software and browser.\n\nIn Node, use like...\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\nvar provider = new fiftyonedegrees.provider(config);\nvar match = provider.getMatch(userAgent);\nconsole.log(match['IsMobile']);\nconsole.log(match['DeviceType']);\nmatch.close();\n```\n... to turn User-Agent HTTP headers into useful information about physical screen size, device price and type of device.\n\nTwo detection methods are supported.\n\n**Pattern:**  Searches for device signatures in a useragent returning metrics about the validity of the results. Does NOT use regular expressions.\n\n**Trie:** A large binary Trie (pronounced Try) populated with User-Agent signatures. Very fast.\n\nAll methods use an external data file which can easilly be updated.\n\n## Dependencies\n\n#### Essential\n- node.js (https://nodejs.org/en/download/package-manager/)\n- node-gyp (https://github.com/nodejs/node-gyp)\n- gcc/g++ >=4.7 *or* Visual C++ Build tools\n\n## Install\nInstall the core 51Degrees module with:\n```\n$ npm install fiftyonedegreescore\n```\nThis will also install Pattern and Trie Lite data files as dependencies.\n\n### Windows\nNode has know issues installing modules in Windows. Three things must be in place before installing.\n1. Install Visual C++ Build Tools\n2. Install Python 2.7 and run ``npm config set python python2.7``\n3. Open a terminal and run ``npm config set msvs_version 2015``\n\nAlternatively, Microsoft have offered an npm package to install all this and can be run (in an elevated Power Shell) with ``npm install -g windows-build-tools``.\n\nFull explanation of windows issues can be found at https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md\n\nWhen you're done installing, check it's set up correctly by recreating the output in the Usage section below. Or if you've cloned this repository, try the examples.\n\n### GitHub\nIf installing from the GitHub repository, the source should be coppied before installing.\n\nMove to the node.js directory with\n```\n$ cd Device-Detection/node.js\n```\ncopy the source and data files to the fiftyonedegreescore directory with\n```\n$ node copySource.js\n```\ninstall the local packages in order with\n```\n$ npm install ./fiftyonedegreeslitepattern\n$ npm install ./fiftyonedegreeslitetrie\n$ npm install ./fiftyonedegreescore\n```\n\n## Configure\nThe config json object is where all the settings can be changed, it is also possible to initialise the provider a path to a .json file in the same format.\n\nThe most basic example using just a data file  can be seen below:\n```js\nvar pattern = require('fiftyonedegreeslitepattern');\nvar trie = require('fiftyonedegreeslitetrie');\n\nvar config = {\"dataFile\" : pattern};\n\nvar provider = new fiftyonedegreescore(config);\n```\n### Settings\n\n#### General Settings\n - String ``dataFile``. (defaults to the ``fiftyonedegreeslitepattern`` package). Path to a Pattern or Trie database file.\n \n - String ``properties`` (defaults to all available). Comma separated list of case-sensitive property names to be fetched on every device detection. Leave empty to fetch all available properties.\n\n - String ``License``. Your 51Degrees license key. This is required if you want to set up the automatic package updates.\n\n - String ``Product``. Your preferred enhanced device data product. This is used to auto update your data file, provided you have a valid license key. As Lite is included by default you should add ``Premium`` or ``Enterprise``. \n\n#### Pattern Specific Settings\n - Integer ``cacheSize`` (defaults to ``10000``). Sets the size of the workset cache.\n\n - Integer ``poolSize`` (defaults to ``20``). Sets the size of the workset pool.\n\n#### Usage Sharer Settings\n - Boolean ``UsageSharingEnabled`` (defaults to ``true``). Indicates if usage data should be shared with 51Degrees.com. We recommended leaving this value unchanged to ensure we're improving the performance and accuracy of the solution. If this is enabled, you may need to allow HTTPS traffic to the 51Degrees address.\n \n#### Interface Settings\n - Boolean ``setGetters`` (defaults to ``true``). Indicates whether getters are set for the match object so that ``match.IsMobile`` can be used in place of ``match.getValue('IsMobile')``. This makes things simpler when using properties that can return an array of values.\n \n - Boolean ``stronglyTyped`` (defaults to ``true``). Indicates whether the match getters return boolean values as a string (``True``/``False``) or a boolean type (``true``/``false``).\n \n#### Automatic updates\nIf you want to set up automatic updates, add your license key and product to your settings. The provider will automatically update the data file whenvever a new one is available. This will replace the file in the location it has been loaded from when the provider was initialised.\n\nWhen automatic updates are enabled a timer will check for a new data file every 30 minutes. You can stop this timer by closing the provider like...\n\n```js\nprovider.close();\n```\n\nFor Lite users, the data file can be updated by updating the Lite data package (either ``fiftyonedegreeslitepattern`` or ``fiftyonedegreeslitetrie``).\n\nFor more information on data options, see https://51degrees.com/compare-data-options\n\n## Usage\nTo check everything is set up , try fetching a match, load the module and start matching with\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\n\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern'),\n              'properties' : 'BrowserName,ScreenPixelsWidth'};\n\nvar provider = fiftyonedegrees.provider(config);\n\nvar device = provider.getMatch(\"Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176\");\n\nconsole.log(device.Id);\nconsole.log(device.BrowserName);\nconsole.log(device.ScreenPixelsWidth);\n\ndevice.close();\n```\nwhich will output:\n```\n15767-18117-17776-18092\nMobileSafari\n1024\n```\n\n#### Provider\nThe provider is initialised with config object or file path as detailed in the configuration section above. This is done with:\n```js\nvar fiftyonedegreescore = require('fiftyonedegreescore');\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern')};\nvar provider = new fiftyonedegreescore.provider(config);\n```\n\n#### Match\nUsing the provider's ``getMatch`` function with a User-Agent string returns a match object from which the properties of the device can be extracted:\n```js\nvar userAgent = '[User-Agent String]';\nvar match = provider.getMatch(userAgent);\nvar isMobile = match.IsMobile;\n\nmatch.close();\n```\nThe ``close`` method must be called when the Match object is no longer needed to release it back to the provider's pool for reuse.\n\n##### Muliple HTTP Headers\nA match can also be carried out on multiple HTTP headers in the same way, where instead of passing in a User-Agent string, a JSON object containing the headers is used like\n```js\nvar headers = {'user-agent': userAgent,\n               etc...\n               };\nvar match = provider.getMatch(headers);\nmatch.close();\n```\n\n##### HTTP Request\nWhen used in an HTTP server the request object can be used. Using this method means that the match object is closed when the request ends so there is no need to implement ``match.close()``. The match object is also attached to the request as ``fiftyoneDevice`` when ``getMatch()`` is called so can be accessed in one of two ways:\n\n1. The same as with a match outside of an HTTP server\n```js\nvar match = provider.getMatch(request);\nvar isMobile = match.IsMobile;\n```\n2. Through the request object\n```js\nprovider.getMatch(request);\nvar isMobile = request.fiftyoneDevice.IsMobile;\n```\n\n#### Examples\nIn the examples folder, you can find examples of various functionalities that the 51Degrees detector has such as:\n- Matching with a User-Agent\n- Matching with a device id\n- Evaluating match metrics\n- Offline processing\n- Strongly typed variables\n- Finding profiles\n\nFull example documentation can be found at https://51Degrees.com/Support/Documentation/APIs/Nodejs-V32/Tutorials\n\n#### Example Server\nThe example **server.js** runs a server at localhost:8080 by default and returns matches from the web browsers User-Agent and all relevant HTTP headers seperately. Is run with\n```\n$ node examples/server.js pattern\n```\nor\n```\n$ node examples/server.js trie\n```\n\n#### Http and Express\nThere are also simple HTTP and express server examples. These can be run with\n```\n$ node examples/client.js \n```\nand \n```\n$ node examples/expressClient.js\n```\n\n##### expressClient.js dependencies\n- express (https://expressjs.com/en/starter/installing.html)\n\n\n### Logging\nLog events are emitted via ``fiftyonedegreescore.log`` with the possible events being **error**, **info** and **debug**. A function can be attached to any of these events in the expected way like\n```js\nfiftyonedegreescore.log.on('error', function(err) {\n    // Oh no, an error!\n    console.log(err);\n})\n```\nto print the an error.\n\n**NOTE: if the ``error`` event is not listened for, node will treat it as a full blown error and exit the process. So be sure to add the above function as a minimum.**\n\n### Tests\nAPI and performance tests can be run from the module directory with either\n```\n$ mocha test.js --pattern\n```\nor\n```\n$ mocha test.js --trie\n```\n\n##### Test dependencies\n- mocha (https://mochajs.org/#installation)\n","_shasum":"55523a2d1deedb94c5cdddead4a37a20a2eed083","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.5.2","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.10.0","dependencies":{"fiftyonedegreeslitetrie":">=3.2.22-dev","fiftyonedegreeslitepattern":">=3.2.22-dev"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.22-dev_1543423220195_0.6164025228755488","host":"s3://npm-registry-packages"}},"3.2.22-dev2":{"name":"fiftyonedegreescore","version":"3.2.22-dev2","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.22-dev2","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"f4062851323e37cb533180461fc48d91ebdfa9e2","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.22-dev2.tgz","fileCount":29,"integrity":"sha512-XwXVc+hV/Z0e/E1wW0LwEuMviJU0sFEE37lKSwBKBkqNcSupVvokN81OAxClhNaZNFwUd3QU70TUkArf9Jgd9Q==","signatures":[{"sig":"MEUCIH+stxJnltVb4qPS81qlWz3qtpRd2WrMfGO/JWDuJvISAiEAwnViyJAa8BWtX4dd0LyPJaqtBNo4Gznz0TrB+MBVp0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPgLFCRA9TVsSAnZWagAAdJMP/3YIIY/kaLZWDPtdDhSQ\nOQOu6pqvLm/4qPh+wsef4hGvPlbRu/qM4ThxKW2J6s+ZQ1n0pdXX3d4uAbT0\nizzgqNwJpXhv6I0sgKG9N67oRG4aKhoJcZLVGirA6qAjTSgiAZGn52dxg3Za\nlB1JPqm5Xh88vamRvOh5DeCWUnUCxcsxQS4LFIyBSESy1ZKl0py2Vhzx30VV\nv3ALnF1MgoIWqrmzbn4hKFKEag5kxsHHh5en7wjcE3mkIAtbDnBn4xNk1O+Z\nfqLNqzlPpgC5RYOQYmFR66FCzyW3yvIoxI9P9Pi0rjk+eOhtz03Y9UOutTBJ\nX4KSQKw/iYadOkStd9v6lFFQ4fQ9CesOIP0/wA/WkR6xy6+ngwObKqITBCHC\nGTW65ACdCzliLDpuoGr9Sm9yO6dItRbFojnMCfAnWrBVulLuKQnL6WfCdRAt\nPBYw5h+h1JMU+nNqIcpukbU6fIetc9j635E3r0QwygbdNRDESwtzQx3QbF9k\nuJKhASK57ipgvDSZia2wEsCC5blrauaR7HLf1AwJpyg+q6blhJ+eBnM00zTy\nlbEwcsTGOPZQj5eAM94eY1oFyNuHYymHSTMuEKWBZi18WSDq8iHhFHolXFA+\n2Sitpxi8p3R7Ahw3dlhamEWFIG4z5vReCxnJDCg7w29jj+xYXZTW0wai95m1\nSjGB\r\n=Jc3v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"5.6.0","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.11.4","_hasShrinkwrap":false,"devDependencies":{"fiftyonedegreeslitetrie":">=3.2.22-dev","fiftyonedegreeslitepattern":">=3.2.22-dev"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.22-dev2_1547567812447_0.6636590660413946","host":"s3://npm-registry-packages"}},"3.2.23":{"name":"fiftyonedegreescore","version":"3.2.23","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.23","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"a86bbd75141b0517e792a619b2929eeef5d53ded","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.23.tgz","fileCount":29,"integrity":"sha512-TMBSRqXAsf174CIXAXM63cGN6nO0aecpm0OBRMpNR2RpO5iJJp6rDpswbKQc1dFiRTgz1skmRofWhik9lgX+cQ==","signatures":[{"sig":"MEQCICylm9GaJ5WGClfDyNnXQA05run3cHjNcDSg7ATUJ3t+AiBux3Tl7engJ1qN29Z/78mg9gPCsgthlzsPDeRdzF04ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWHXyCRA9TVsSAnZWagAA9sEP/1T5dFQfVt4BOe3L7Hq7\n2FMaH6ByT+2kLzaF84X0+AIv/vBv7EOUfLP4yusp23agwH5ENoEtyhf7YOn0\nUMejLbO0Gpf0pMZDCpPY1G48E0YrxjccJZMMoMpIko7plK7n47CSKPMjNtV5\nuKgdiegE3pb6pqtbG0p1bhgPAFsML7uXerJ/KM7NhmrOHa0XfPNan5nQEgiL\n/6/2XEGc+HsvyfH5U3vMgY0RrE0V+Vzh5cdmuQTG4ZNJptobMgE1aYTGTmFQ\nO820g/iQdpPfFnStjj1p/KA6deqtS86qq417vN+DyPzRj9a9t+te1YY3oSA/\nvvuao430QGGUMwq4OG8sD4b8rj08I9Brkxm1XGhlpBf4IVt05sUVuxz3C0FT\nk3jzVIdZVGErSpZc+vwETfrs6/Z3B69IeZa7ySSU3lJsSQ9MYr48I4VrELJh\nDS6I3r/Z1e2XeDgG2XL013Wowf41wAeGHs1vydSphddrj5Be4fjBexC2zdor\nZejgS3CYb+jvqFzLQOoPjkUXg7cZJsoW9L4TLKHiZKjPlLFBnuQI7WP+wXsZ\nsQoJRwQEYhpxEesywPqlWu7CvfWCgZmrVDQret8677XHF1CVLX1u57NOQa+J\n19jxmxsPsJESv4z/xk4aVeZC23ScrKB/nxz5DkmRuEWX74f+0zlLmXkdwRFz\netrQ\r\n=n36S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"support@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"5.6.0","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.11.4","_hasShrinkwrap":false,"devDependencies":{"fiftyonedegreeslitetrie":">=3.2.21","fiftyonedegreeslitepattern":">=3.2.21"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.23_1549301233513_0.5583871190236505","host":"s3://npm-registry-packages"}},"3.2.24-dev":{"name":"fiftyonedegreescore","version":"3.2.24-dev","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.24-dev","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"b93c4fe69591a04bb9f9334e50574526dfba74ea","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.24-dev.tgz","fileCount":30,"integrity":"sha512-7MleL0VOB6V70EQdfuA6AoeYjwnNlKopbnOBVcnDikxqX4pIp4eitWVo8cl0keZQz5TLKvUFW3AUfwbvYZ+DgA==","signatures":[{"sig":"MEQCIFRa8XrPmU5Ka54GcfQOdjFyOZIA8OQOVr8rB4/ECIxOAiB8fBk34W10I2nJW1tWcZuL1OeSdv1uqcz/VCAOeYpAgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSEOECRA9TVsSAnZWagAAOQoQAIM2L2gAZE5V/YrkL+qa\nH6ClfHrKcdVG7spjUzZp8rUyBjK2XlaR+NrRn+PebWECzpubD1SCAhf5+SNS\n/aCz5M/ppmAwAuxvM67s698rWJz4bsoavb4ECzAJxclI9ZyAY6UIEXShdXNE\n1yUkWkS0FOU9EC4hP5FQO8r6zpVjp9jb6dpUCro2Uq1sUCYeSFFnCNdDBeSZ\nL+QZ6ZQOYzf8QBDdAjKvGdmo5vnyJ3mXMzLmKJIBuIyKGymT3jlKDprfVsaL\nrw/2K2qbhV8iaYBIC5v/nUVl2YHWbwBJoMnGukh5BVrXZyDyOii6auCdtEgP\nD1ZD/PUHDdJg1nJ12ZC7bnXmaj26TbqTgHjUQqHD9LYopexxSmwJv+jeZyMg\naOGbeN8lxmw8q1uGRNmUZZeRo3IL+1S/WlddqpPiIGkX6YaOrbxggXe96vTj\nNfd+cgwRSJTwVOC9NHl6hpvT4Xc6xyGqW3PzTtNA4hx7G7dFP+G+RKE3XsxM\nNIaR/n39qxDNPgN7/eMor8qDh3qLnpDGpFv1+yYr9HhJYArHgSRevAF95KFd\nbfy4lPRjT9bkpYtH+rL6oRxksICFomtWoIY8TgpwGwFEoBXldlvrnWAfgdlv\nPqNcCcTfqAkmUdNEPSemb/wnjX/dO9N0I3C6G3FQ3XUueDximNKI4sKTxISx\nR/0j\r\n=MQEA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","_from":"fiftyonedegreescore","readme":"![51Degrees](https://51degrees.com/DesktopModules/FiftyOne/Distributor/Logo.ashx?utm_source=NPM&utm_medium=package&utm_content=readme_main&utm_campaign=node-open-source \"THE Fastest and Most Accurate Device Detection\") **Device Detection in C** Node.js wrapper\n\n[Supported Databases](https://51degrees.com/compare-data-options?utm_source=NPM&utm_medium=package&utm_content=compare-data-options&utm_campaign=node-open-source \"Different device databases which can be used with 51Degrees device detection\") | [Developer Documention](https://51degrees.com/support/documentation?utm_source=NPM&utm_medium=package&utm_content=documentation&utm_campaign=node-open-source \"Full getting started guide and advanced developer documentation\") | [Available Properties](https://51degrees.com/resources/property-dictionary?utm_source=NPM&utm_medium=package&utm_content=property_dictionary&utm_campaign=node-open-source \"View all available properties and values\")\n\n<sup>Need [.NET](https://github.com/51Degrees/.NET-Device-Detection \"THE Fastest and most Accurate device detection for .NET\") | [Java](https://github.com/51Degrees/Java-Device-Detection \"THE Fastest and most Accurate device detection for Java\") | [PHP Script](https://github.com/51Degrees/51Degrees-PHP)?</sup>\n\n<mark>**IMPORTANT NOTE: From version 3.2.23 onwards the `fiftyonedegreeslitepattern` and `fiftyonedegreeslitetrie` data packages are no longer dependencies of this package.**</mark>\n\n## Introduction\nUse this project with core node.js, HTTP module or Express to detect device properties using HTTP browser User-Agents as input. It can be used to process server web log files, or for real time device detection to support web optimisation. The module takes a User-Agent string, HTTP header array or HTTP request object and returns a Match object ontaining properties relating to the device's hardware, software and browser.\n\nIn Node, use like...\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\nvar provider = new fiftyonedegrees.provider(config);\nvar match = provider.getMatch(userAgent);\nconsole.log(match['IsMobile']);\nconsole.log(match['DeviceType']);\nmatch.close();\n```\n... to turn User-Agent HTTP headers into useful information about physical screen size, device price and type of device.\n\nTwo detection methods are supported.\n\n**Pattern:**  Searches for device signatures in a useragent returning metrics about the validity of the results. Does NOT use regular expressions.\n\n**Trie:** A large binary Trie (pronounced Try) populated with User-Agent signatures. Very fast.\n\nAll methods use an external data file which can easilly be updated.\n\n## Dependencies\n\n#### Essential\n- node.js (https://nodejs.org/en/download/package-manager/)\n- node-gyp (https://github.com/nodejs/node-gyp)\n- gcc/g++ >=4.7 *or* Visual C++ Build tools\n\n## Install\nInstall the core 51Degrees module with:\n```\n$ npm install fiftyonedegreescore\n```\nThis will also install Pattern and Trie Lite data files as dependencies.\n\n### Windows\nNode has know issues installing modules in Windows. Three things must be in place before installing.\n1. Install Visual C++ Build Tools\n2. Install Python 2.7 and run ``npm config set python python2.7``\n3. Open a terminal and run ``npm config set msvs_version 2015``\n\nAlternatively, Microsoft have offered an npm package to install all this and can be run (in an elevated Power Shell) with ``npm install -g windows-build-tools``.\n\nFull explanation of windows issues can be found at https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md\n\nWhen you're done installing, check it's set up correctly by recreating the output in the Usage section below. Or if you've cloned this repository, try the examples.\n\n### GitHub\nIf installing from the GitHub repository, the source should be coppied before installing.\n\nMove to the node.js directory with\n```\n$ cd Device-Detection/node.js\n```\ncopy the source and data files to the fiftyonedegreescore directory with\n```\n$ node copySource.js\n```\ninstall the local packages in order with\n```\n$ npm install ./fiftyonedegreeslitepattern\n$ npm install ./fiftyonedegreeslitetrie\n$ npm install ./fiftyonedegreescore\n```\n\n## Configure\nThe config json object is where all the settings can be changed, it is also possible to initialise the provider a path to a .json file in the same format.\n\nThe most basic example using just a data file  can be seen below:\n```js\nvar pattern = require('fiftyonedegreeslitepattern');\nvar trie = require('fiftyonedegreeslitetrie');\n\nvar config = {\"dataFile\" : pattern};\n\nvar provider = new fiftyonedegreescore(config);\n```\n### Settings\n\n#### General Settings\n - String ``dataFile``. (defaults to the ``fiftyonedegreeslitepattern`` package). Path to a Pattern or Trie database file.\n \n - String ``properties`` (defaults to all available). Comma separated list of case-sensitive property names to be fetched on every device detection. Leave empty to fetch all available properties.\n\n - String ``License``. Your 51Degrees license key. This is required if you want to set up the automatic package updates.\n\n - String ``Product``. Your preferred enhanced device data product. This is used to auto update your data file, provided you have a valid license key. As Lite is included by default you should add ``Premium`` or ``Enterprise``. \n\n#### Pattern Specific Settings\n - Integer ``cacheSize`` (defaults to ``10000``). Sets the size of the workset cache.\n\n - Integer ``poolSize`` (defaults to ``20``). Sets the size of the workset pool.\n\n#### Usage Sharer Settings\n - Boolean ``UsageSharingEnabled`` (defaults to ``true``). Indicates if usage data should be shared with 51Degrees.com. We recommended leaving this value unchanged to ensure we're improving the performance and accuracy of the solution. If this is enabled, you may need to allow HTTPS traffic to the 51Degrees address.\n \n#### Interface Settings\n - Boolean ``setGetters`` (defaults to ``true``). Indicates whether getters are set for the match object so that ``match.IsMobile`` can be used in place of ``match.getValue('IsMobile')``. This makes things simpler when using properties that can return an array of values.\n \n - Boolean ``stronglyTyped`` (defaults to ``true``). Indicates whether the match getters return boolean values as a string (``True``/``False``) or a boolean type (``true``/``false``).\n \n#### Automatic updates\nIf you want to set up automatic updates, add your license key and product to your settings. The provider will automatically update the data file whenvever a new one is available. This will replace the file in the location it has been loaded from when the provider was initialised.\n\nWhen automatic updates are enabled a timer will check for a new data file every 30 minutes. You can stop this timer by closing the provider like...\n\n```js\nprovider.close();\n```\n\nFor Lite users, the data file can be updated by updating the Lite data package (either ``fiftyonedegreeslitepattern`` or ``fiftyonedegreeslitetrie``).\n\nFor more information on data options, see https://51degrees.com/compare-data-options\n\n## Usage\nTo check everything is set up , try fetching a match, load the module and start matching with\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\n\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern'),\n              'properties' : 'BrowserName,ScreenPixelsWidth'};\n\nvar provider = fiftyonedegrees.provider(config);\n\nvar device = provider.getMatch(\"Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176\");\n\nconsole.log(device.Id);\nconsole.log(device.BrowserName);\nconsole.log(device.ScreenPixelsWidth);\n\ndevice.close();\n```\nwhich will output:\n```\n15767-18117-17776-18092\nMobileSafari\n1024\n```\n\n#### Provider\nThe provider is initialised with config object or file path as detailed in the configuration section above. This is done with:\n```js\nvar fiftyonedegreescore = require('fiftyonedegreescore');\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern')};\nvar provider = new fiftyonedegreescore.provider(config);\n```\n\n#### Match\nUsing the provider's ``getMatch`` function with a User-Agent string returns a match object from which the properties of the device can be extracted:\n```js\nvar userAgent = '[User-Agent String]';\nvar match = provider.getMatch(userAgent);\nvar isMobile = match.IsMobile;\n\nmatch.close();\n```\nThe ``close`` method must be called when the Match object is no longer needed to release it back to the provider's pool for reuse.\n\n##### Muliple HTTP Headers\nA match can also be carried out on multiple HTTP headers in the same way, where instead of passing in a User-Agent string, a JSON object containing the headers is used like\n```js\nvar headers = {'user-agent': userAgent,\n               etc...\n               };\nvar match = provider.getMatch(headers);\nmatch.close();\n```\n\n##### HTTP Request\nWhen used in an HTTP server the request object can be used. Using this method means that the match object is closed when the request ends so there is no need to implement ``match.close()``. The match object is also attached to the request as ``fiftyoneDevice`` when ``getMatch()`` is called so can be accessed in one of two ways:\n\n1. The same as with a match outside of an HTTP server\n```js\nvar match = provider.getMatch(request);\nvar isMobile = match.IsMobile;\n```\n2. Through the request object\n```js\nprovider.getMatch(request);\nvar isMobile = request.fiftyoneDevice.IsMobile;\n```\n\n#### Examples\nIn the examples folder, you can find examples of various functionalities that the 51Degrees detector has such as:\n- Matching with a User-Agent\n- Matching with a device id\n- Evaluating match metrics\n- Offline processing\n- Strongly typed variables\n- Finding profiles\n\nFull example documentation can be found at https://51Degrees.com/Support/Documentation/APIs/Nodejs-V32/Tutorials\n\n#### Example Server\nThe example **server.js** runs a server at localhost:8080 by default and returns matches from the web browsers User-Agent and all relevant HTTP headers seperately. Is run with\n```\n$ node examples/server.js pattern\n```\nor\n```\n$ node examples/server.js trie\n```\n\n#### Http and Express\nThere are also simple HTTP and express server examples. These can be run with\n```\n$ node examples/client.js \n```\nand \n```\n$ node examples/expressClient.js\n```\n\n##### expressClient.js dependencies\n- express (https://expressjs.com/en/starter/installing.html)\n\n\n### Logging\nLog events are emitted via ``fiftyonedegreescore.log`` with the possible events being **error**, **info** and **debug**. A function can be attached to any of these events in the expected way like\n```js\nfiftyonedegreescore.log.on('error', function(err) {\n    // Oh no, an error!\n    console.log(err);\n})\n```\nto print the an error.\n\n**NOTE: if the ``error`` event is not listened for, node will treat it as a full blown error and exit the process. So be sure to add the above function as a minimum.**\n\n### Tests\nAPI and performance tests can be run from the module directory with either\n```\n$ mocha test.js --pattern\n```\nor\n```\n$ mocha test.js --trie\n```\n\n##### Test dependencies\n- mocha (https://mochajs.org/#installation)\n","_shasum":"b93c4fe69591a04bb9f9334e50574526dfba74ea","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"ITSupport@51degrees.com"},"_resolved":"file:fiftyonedegreescore","repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"3.5.2","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"fiftyonedegreeslitetrie":">=3.2.21","fiftyonedegreeslitepattern":">=3.2.21"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.24-dev_1565016963378_0.4260029704491499","host":"s3://npm-registry-packages"}},"3.2.24":{"name":"fiftyonedegreescore","version":"3.2.24","author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","_id":"fiftyonedegreescore@3.2.24","maintainers":[{"name":"51degrees","email":"support@51degrees.com"}],"homepage":"https://github.com/51Degrees/Device-Detection","bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"dist":{"shasum":"24ff2766d86d357af12b6be13087131d0ba08c79","tarball":"https://registry.npmjs.org/fiftyonedegreescore/-/fiftyonedegreescore-3.2.24.tgz","fileCount":29,"integrity":"sha512-bfknWQvIDFGQYI3j/P5ULwq1wpUhlxd+XkSXEEN2Q45StE/vHL/lxG3RYlMIjXaQgQALfPyfbeUOKZTyH1s2Ww==","signatures":[{"sig":"MEYCIQDYKV0oKpsAA1iTJidKTmd+JhCpzqtikRpjACQhCtALeQIhAMXmg2oUFzm0zeqT1aOS0GM5xfDTftE/bgbqkafTx6vd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWqmvCRA9TVsSAnZWagAAW+cP/2t6y9v16tfcdAPEMn5d\npZpk9UeFRKnTVBETkJXLogYnQ7poGqS7zyoBzfBVQKzBc3bXf2IrOV983kJY\nHqT9wusdXqJxfbvhuHOG9U4M971+ZxYp/XiAbjtCPOnncfOOPs5MNrFUgpcM\nuhI1CJLegJcDhEjN0a907b245/9ieYiduLYeJrgw1ZmSslnz4kFNP5AKZFWv\n1b9dMBhcRoEHMt776GIJihuhSSrqzFWwlv8BRqnaj30dw1tlRfvrrxyUM7oa\nedNfrHLxk8o4h8Z6gZ5G6PTUGVKOB0F4aash7WV7x1eqJsCA6U5HQAzjl0Ol\nxFlGsEUVrrLt/njRYrrSZFBGFlp/z/UpUPMQ8Li2dOaGvo4frqmpGntPHHdt\nz7dQw5SpNX2Bb6yM3hU85YJSotmu0C/0QZ0u7g2bIyF0yXEOo7CUSNMTCDAS\nEiBU0KuT6jTHHFKOCPdL1iCjFqQjr7sEIaNMAW83p7aCc+rzEMrk3+01Cf5b\nVEysSMYdXeyYj3ZoD4/ZuxRmIbZiTWPiEIN5v+5QKk9tkXkOoDSOp81RtWa4\nKLfsirTAkNrwIN6SlLkXdfmJZLZtrZlsWUPcTnHQdIhorIBbjY0S+kALxIaO\nCISrGW/IONr7Vt0wRqjoT+uSijYJUOaRZvf9pWRbUQ518oaT+7u5WSv6K2yl\narZo\r\n=ZPQT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fiftyonedegreescore.js","gypfile":true,"scripts":{"test":"mocha test.js --pattern","install":"node-gyp configure && node-gyp build","preinstall":"node versionCheck.js"},"_npmUser":{"name":"51degrees","email":"ITSupport@51degrees.com"},"repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"_npmVersion":"6.9.0","description":"51degrees device detection for nodejs","directories":{},"_nodeVersion":"12.2.0","_hasShrinkwrap":false,"devDependencies":{"fiftyonedegreeslitetrie":">=3.2.21","fiftyonedegreeslitepattern":">=3.2.21"},"_npmOperationalInternal":{"tmp":"tmp/fiftyonedegreescore_3.2.24_1566222767102_0.5248016301678506","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-08-18T16:51:52.839Z","modified":"2026-09-25T12:15:48.879Z","3.2.7":"2016-08-18T16:51:52.839Z","3.2.8":"2016-08-26T14:08:39.489Z","3.2.9":"2016-09-16T09:13:38.853Z","3.2.10":"2016-09-19T09:55:37.185Z","3.2.11":"2016-10-28T13:08:25.376Z","3.2.12":"2016-12-16T11:18:29.908Z","3.2.13":"2017-03-09T15:18:43.796Z","3.2.14":"2017-04-27T10:27:09.230Z","3.2.15":"2017-06-02T09:46:44.202Z","3.2.16":"2017-07-03T16:52:58.549Z","3.2.17":"2017-09-13T15:42:06.860Z","3.2.18-dev":"2017-09-14T09:18:21.798Z","3.2.18":"2017-11-30T16:47:05.975Z","3.2.19":"2018-07-06T14:49:09.150Z","3.2.20":"2018-08-24T17:34:30.590Z","3.3.1-beta":"2018-08-31T16:00:20.262Z","3.2.21":"2018-11-12T14:33:45.541Z","3.2.22-dev":"2018-11-28T16:40:20.339Z","3.2.22-dev2":"2019-01-15T15:56:52.628Z","3.2.23":"2019-02-04T17:27:13.730Z","3.2.24-dev":"2019-08-05T14:56:03.545Z","3.2.24":"2019-08-19T13:52:47.243Z"},"bugs":{"url":"https://github.com/51Degrees/Device-Detection/issues"},"author":{"name":"51Degrees","email":"support@51Degrees.com"},"license":"MPL-2.0","homepage":"https://github.com/51Degrees/Device-Detection","repository":{"url":"git+ssh://git@github.com/51Degrees/Device-Detection.git","type":"git"},"description":"51degrees device detection for nodejs","maintainers":[{"email":"eugene.dorfman@postindustria.com","name":"eugenedorfman"},{"email":"roman.sertsov@postindustria.com","name":"roman.s"},{"email":"james@51degrees.com","name":"jwrosewell"},{"email":"jamesr@51degrees.com","name":"jamesr51d"}],"readme":"![51Degrees](https://51degrees.com/DesktopModules/FiftyOne/Distributor/Logo.ashx?utm_source=NPM&utm_medium=package&utm_content=readme_main&utm_campaign=node-open-source \"THE Fastest and Most Accurate Device Detection\") **Device Detection in C** Node.js wrapper\n\n[Supported Databases](https://51degrees.com/compare-data-options?utm_source=NPM&utm_medium=package&utm_content=compare-data-options&utm_campaign=node-open-source \"Different device databases which can be used with 51Degrees device detection\") | [Developer Documention](https://51degrees.com/support/documentation?utm_source=NPM&utm_medium=package&utm_content=documentation&utm_campaign=node-open-source \"Full getting started guide and advanced developer documentation\") | [Available Properties](https://51degrees.com/resources/property-dictionary?utm_source=NPM&utm_medium=package&utm_content=property_dictionary&utm_campaign=node-open-source \"View all available properties and values\")\n\n<sup>Need [.NET](https://github.com/51Degrees/.NET-Device-Detection \"THE Fastest and most Accurate device detection for .NET\") | [Java](https://github.com/51Degrees/Java-Device-Detection \"THE Fastest and most Accurate device detection for Java\") | [PHP Script](https://github.com/51Degrees/51Degrees-PHP)?</sup>\n\n<mark>**IMPORTANT NOTE: From version 3.2.23 onwards the `fiftyonedegreeslitepattern` and `fiftyonedegreeslitetrie` data packages are no longer dependencies of this package.**</mark>\n\n## Introduction\nUse this project with core node.js, HTTP module or Express to detect device properties using HTTP browser User-Agents as input. It can be used to process server web log files, or for real time device detection to support web optimisation. The module takes a User-Agent string, HTTP header array or HTTP request object and returns a Match object ontaining properties relating to the device's hardware, software and browser.\n\nIn Node, use like...\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\nvar provider = new fiftyonedegrees.provider(config);\nvar match = provider.getMatch(userAgent);\nconsole.log(match['IsMobile']);\nconsole.log(match['DeviceType']);\nmatch.close();\n```\n... to turn User-Agent HTTP headers into useful information about physical screen size, device price and type of device.\n\nTwo detection methods are supported.\n\n**Pattern:**  Searches for device signatures in a useragent returning metrics about the validity of the results. Does NOT use regular expressions.\n\n**Trie:** A large binary Trie (pronounced Try) populated with User-Agent signatures. Very fast.\n\nAll methods use an external data file which can easilly be updated.\n\n## Dependencies\n\n#### Essential\n- node.js (https://nodejs.org/en/download/package-manager/)\n- node-gyp (https://github.com/nodejs/node-gyp)\n- gcc/g++ >=4.7 *or* Visual C++ Build tools\n\n## Install\nInstall the core 51Degrees module with:\n```\n$ npm install fiftyonedegreescore\n```\nThis will also install Pattern and Trie Lite data files as dependencies.\n\n### Windows\nNode has know issues installing modules in Windows. Three things must be in place before installing.\n1. Install Visual C++ Build Tools\n2. Install Python 2.7 and run ``npm config set python python2.7``\n3. Open a terminal and run ``npm config set msvs_version 2015``\n\nAlternatively, Microsoft have offered an npm package to install all this and can be run (in an elevated Power Shell) with ``npm install -g windows-build-tools``.\n\nFull explanation of windows issues can be found at https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md\n\nWhen you're done installing, check it's set up correctly by recreating the output in the Usage section below. Or if you've cloned this repository, try the examples.\n\n### GitHub\nIf installing from the GitHub repository, the source should be coppied before installing.\n\nMove to the node.js directory with\n```\n$ cd Device-Detection/node.js\n```\ncopy the source and data files to the fiftyonedegreescore directory with\n```\n$ node copySource.js\n```\ninstall the local packages in order with\n```\n$ npm install ./fiftyonedegreeslitepattern\n$ npm install ./fiftyonedegreeslitetrie\n$ npm install ./fiftyonedegreescore\n```\n\n## Configure\nThe config json object is where all the settings can be changed, it is also possible to initialise the provider a path to a .json file in the same format.\n\nThe most basic example using just a data file  can be seen below:\n```js\nvar pattern = require('fiftyonedegreeslitepattern');\nvar trie = require('fiftyonedegreeslitetrie');\n\nvar config = {\"dataFile\" : pattern};\n\nvar provider = new fiftyonedegreescore(config);\n```\n### Settings\n\n#### General Settings\n - String ``dataFile``. (defaults to the ``fiftyonedegreeslitepattern`` package). Path to a Pattern or Trie database file.\n \n - String ``properties`` (defaults to all available). Comma separated list of case-sensitive property names to be fetched on every device detection. Leave empty to fetch all available properties.\n\n - String ``License``. Your 51Degrees license key. This is required if you want to set up the automatic package updates.\n\n - String ``Product``. Your preferred enhanced device data product. This is used to auto update your data file, provided you have a valid license key. As Lite is included by default you should add ``Premium`` or ``Enterprise``. \n\n#### Pattern Specific Settings\n - Integer ``cacheSize`` (defaults to ``10000``). Sets the size of the workset cache.\n\n - Integer ``poolSize`` (defaults to ``20``). Sets the size of the workset pool.\n\n#### Usage Sharer Settings\n - Boolean ``UsageSharingEnabled`` (defaults to ``true``). Indicates if usage data should be shared with 51Degrees.com. We recommended leaving this value unchanged to ensure we're improving the performance and accuracy of the solution. If this is enabled, you may need to allow HTTPS traffic to the 51Degrees address.\n \n#### Interface Settings\n - Boolean ``setGetters`` (defaults to ``true``). Indicates whether getters are set for the match object so that ``match.IsMobile`` can be used in place of ``match.getValue('IsMobile')``. This makes things simpler when using properties that can return an array of values.\n \n - Boolean ``stronglyTyped`` (defaults to ``true``). Indicates whether the match getters return boolean values as a string (``True``/``False``) or a boolean type (``true``/``false``).\n \n#### Automatic updates\nIf you want to set up automatic updates, add your license key and product to your settings. The provider will automatically update the data file whenvever a new one is available. This will replace the file in the location it has been loaded from when the provider was initialised.\n\nWhen automatic updates are enabled a timer will check for a new data file every 30 minutes. You can stop this timer by closing the provider like...\n\n```js\nprovider.close();\n```\n\nFor Lite users, the data file can be updated by updating the Lite data package (either ``fiftyonedegreeslitepattern`` or ``fiftyonedegreeslitetrie``).\n\nFor more information on data options, see https://51degrees.com/compare-data-options\n\n## Usage\nTo check everything is set up , try fetching a match, load the module and start matching with\n```js\nvar fiftyonedegrees = require('fiftyonedegreescore');\n\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern'),\n              'properties' : 'BrowserName,ScreenPixelsWidth'};\n\nvar provider = fiftyonedegrees.provider(config);\n\nvar device = provider.getMatch(\"Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176\");\n\nconsole.log(device.Id);\nconsole.log(device.BrowserName);\nconsole.log(device.ScreenPixelsWidth);\n\ndevice.close();\n```\nwhich will output:\n```\n15767-18117-17776-18092\nMobileSafari\n1024\n```\n\n#### Provider\nThe provider is initialised with config object or file path as detailed in the configuration section above. This is done with:\n```js\nvar fiftyonedegreescore = require('fiftyonedegreescore');\nvar config = {'dataFile' : require('fiftyonedegreeslitepattern')};\nvar provider = new fiftyonedegreescore.provider(config);\n```\n\n#### Match\nUsing the provider's ``getMatch`` function with a User-Agent string returns a match object from which the properties of the device can be extracted:\n```js\nvar userAgent = '[User-Agent String]';\nvar match = provider.getMatch(userAgent);\nvar isMobile = match.IsMobile;\n\nmatch.close();\n```\nThe ``close`` method must be called when the Match object is no longer needed to release it back to the provider's pool for reuse.\n\n##### Muliple HTTP Headers\nA match can also be carried out on multiple HTTP headers in the same way, where instead of passing in a User-Agent string, a JSON object containing the headers is used like\n```js\nvar headers = {'user-agent': userAgent,\n               etc...\n               };\nvar match = provider.getMatch(headers);\nmatch.close();\n```\n\n##### HTTP Request\nWhen used in an HTTP server the request object can be used. Using this method means that the match object is closed when the request ends so there is no need to implement ``match.close()``. The match object is also attached to the request as ``fiftyoneDevice`` when ``getMatch()`` is called so can be accessed in one of two ways:\n\n1. The same as with a match outside of an HTTP server\n```js\nvar match = provider.getMatch(request);\nvar isMobile = match.IsMobile;\n```\n2. Through the request object\n```js\nprovider.getMatch(request);\nvar isMobile = request.fiftyoneDevice.IsMobile;\n```\n\n#### Examples\nIn the examples folder, you can find examples of various functionalities that the 51Degrees detector has such as:\n- Matching with a User-Agent\n- Matching with a device id\n- Evaluating match metrics\n- Offline processing\n- Strongly typed variables\n- Finding profiles\n\nFull example documentation can be found at https://51Degrees.com/Support/Documentation/APIs/Nodejs-V32/Tutorials\n\n#### Example Server\nThe example **server.js** runs a server at localhost:8080 by default and returns matches from the web browsers User-Agent and all relevant HTTP headers seperately. Is run with\n```\n$ node examples/server.js pattern\n```\nor\n```\n$ node examples/server.js trie\n```\n\n#### Http and Express\nThere are also simple HTTP and express server examples. These can be run with\n```\n$ node examples/client.js \n```\nand \n```\n$ node examples/expressClient.js\n```\n\n##### expressClient.js dependencies\n- express (https://expressjs.com/en/starter/installing.html)\n\n\n### Logging\nLog events are emitted via ``fiftyonedegreescore.log`` with the possible events being **error**, **info** and **debug**. A function can be attached to any of these events in the expected way like\n```js\nfiftyonedegreescore.log.on('error', function(err) {\n    // Oh no, an error!\n    console.log(err);\n})\n```\nto print the an error.\n\n**NOTE: if the ``error`` event is not listened for, node will treat it as a full blown error and exit the process. So be sure to add the above function as a minimum.**\n\n### Tests\nAPI and performance tests can be run from the module directory with either\n```\n$ mocha test.js --pattern\n```\nor\n```\n$ mocha test.js --trie\n```\n\n##### Test dependencies\n- mocha (https://mochajs.org/#installation)\n","readmeFilename":"README.md"}