Safely embed serialized javascript or JSON in a page as temporary global data
npm install safe-json-globals[![build status][1]][2] [![dependency status][3]][4]
Safely embed serialized JSON in a page as temporary global data. HTML tags are sanitized.
``js
var JSONGlobals = require("safe-json-globals")
function (req, res) {
getUser(req, res, function (userRecord) {
var globalsMarkup = JSONGlobals({
user: userRecord,
potentialMaliciousContent: "