UNPKG

browsernizr

Version:

Modernizr wrapper for use with browserify

22 lines (19 loc) 537 B
/*! { "name": "JSON", "property": "json", "caniuse": "json", "notes": [{ "name": "MDN Docs", "href": "https://developer.mozilla.org/en-US/docs/Glossary/JSON" }], "polyfills": ["json2"] } !*/ /* DOC Detects native support for JSON handling functions. */ var Modernizr = require('./../lib/Modernizr.js'); // this will also succeed if you've loaded the JSON2.js polyfill ahead of time // ... but that should be obvious. :) Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);