mirror of
https://github.com/donl/JSON-js.git
synced 2026-05-25 22:06:23 -06:00
Create a JSON object only if one does not already exist.
This commit is contained in:
parent
11c7bdf47c
commit
8d11dc6950
1 changed files with 8 additions and 1 deletions
9
json.js
9
json.js
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
json.js
|
||||
2010-11-18
|
||||
2010-12-08
|
||||
|
||||
Public Domain
|
||||
|
||||
|
|
@ -193,6 +193,13 @@
|
|||
*/
|
||||
|
||||
|
||||
// Create a JSON object only if one does not already exist. We create the
|
||||
// methods in a closure to avoid creating global variables.
|
||||
|
||||
if (!this.JSON) {
|
||||
this.JSON = {};
|
||||
}
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue