mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
22 lines
534 B
JavaScript
22 lines
534 B
JavaScript
/*!
|
|
{
|
|
"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.
|
|
*/
|
|
define(['Modernizr'], function(Modernizr) {
|
|
// 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);
|
|
});
|