node-caniuse
A node library to do compatibility validation for support of HTML5, CSS3, SVG and more in desktop and mobile browsers. Based on data from Fyrd's caniuse.
Installing
npm install caniuse
Usage
Check if CSS 3D transform is supported on android 2.3:
var query = query result; result = ; // query result:// -2 : NOT supported// -1 : NOT supported, but has polyfill available// 0 : unknown// 1 : partially supported, and vendor prefixed// 2 : partially supported// 3 : supported, and vendor prefixed// 4 : supported if result > 2 console;
Check if @font-face is supported on latest version of IE:
var query = query result; result = ; if result > 2 console;
You may want to update the data from caniuse:
cd toolnode updateData.js
You can also update data in code:
var updateData = updateData;;
Related Projects
Fyrd's caniuse: https://github.com/Fyrd/caniuse