This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION jsonb_merge(left JSONB, right JSONB) RETURNS JSONB AS $$ | |
var mergeJSON = function (target, add) { | |
function isObject(obj) { | |
if (typeof obj == "object") { | |
for (var key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
return true; // search for first object prop | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint node:true*/ | |
var http = require('http'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var querystring = require('querystring'); | |
var head = fs.readFileSync('head.html','UTF-8'); | |
//<head> | |
// <meta charset="utf-8"> |