/** * Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js. * @version v1.2.1 - 2014-12-22 * @link https://github.com/yaru22/angular-json-human * @author Brian Park * @license MIT License, http://www.opensource.org/licenses/MIT */ "use strict";angular.module("yaru22.jsonHuman",["yaru22.jsonHuman.tmpls"]).factory("RecursionHelper",["$compile",function(a){var b={compile:function(b){var c,d=b.contents().remove();return function(b,e){c||(c=a(d)),c(b,function(a){e.append(a)});var f=b.json;b.isBoolean=_.isBoolean(f),b.isNumber=_.isNumber(f),b.isString=_.isString(f),b.isPrimitive=b.isBoolean||b.isNumber||b.isString,b.isObject=_.isPlainObject(f),b.isArray=_.isArray(f),b.isEmpty=_.isEmpty(f)}}};return b}]).directive("jsonHuman",function(){return{restrict:"A",scope:{data:"=jsonHuman"},templateUrl:"template/angular-json-human-root.tmpl",link:function(a){a.$watch("data",function(b){if("string"==typeof b)try{b=JSON.parse(b)}catch(c){}a.json=b,a.isObject=_.isPlainObject(b),a.isArray=_.isArray(b)})}}}).directive("jsonHumanHelper",["RecursionHelper",function(a){return{restrict:"A",scope:{json:"=jsonHumanHelper"},templateUrl:"template/angular-json-human.tmpl",compile:function(b){return a.compile(b)}}}]),angular.module("yaru22.jsonHuman.tmpls",[]).run(["$templateCache",function(a){a.put("template/angular-json-human-root.tmpl","
"),a.put("template/angular-json-human.tmpl","{{ json }} (Empty String) (Empty List) (Empty Object)
{{ key }}
")}]);