Files
meteor/packages/json/package.js
David Glasser e712d78cfb Export JSON from json package.
Make sure to use the built-in JSON if it exists.

Fixes #1204.
2013-08-02 11:19:08 -07:00

15 lines
487 B
JavaScript

Package.describe({
summary: "Provides JSON.stringify and JSON.parse for older browsers",
internal: true
});
// We need to figure out how to serve this file only to browsers that don't have
// JSON.stringify (eg, IE7 and earlier, and IE8 outside of "standards mode")
Package.on_use(function (api) {
// Node always has JSON; we only need this in some browsers.
api.export('JSON', 'client');
api.add_files('json_native.js', 'client');
api.add_files('json2.js', 'client');
});