angular2-prettyjson
Advanced tools
Comparing version 2.0.1 to 2.0.2
13
index.js
@@ -1,10 +0,5 @@ | ||
"use strict"; | ||
var prettyjson_module_1 = require("./src/prettyjson.module"); | ||
exports.PrettyJsonModule = prettyjson_module_1.PrettyJsonModule; | ||
var json_pipe_1 = require("./src/json.pipe"); | ||
exports.SafeJsonPipe = json_pipe_1.SafeJsonPipe; | ||
var prettyjson_pipe_1 = require("./src/prettyjson.pipe"); | ||
exports.PrettyJsonPipe = prettyjson_pipe_1.PrettyJsonPipe; | ||
var prettyjson_component_1 = require("./src/prettyjson.component"); | ||
exports.PrettyJsonComponent = prettyjson_component_1.PrettyJsonComponent; | ||
export { PrettyJsonModule } from "./src/prettyjson.module"; | ||
export { SafeJsonPipe } from "./src/json.pipe"; | ||
export { PrettyJsonPipe } from "./src/prettyjson.pipe"; | ||
export { PrettyJsonComponent } from "./src/prettyjson.component"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "angular2-prettyjson", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Angular2 json utils. Includes a pipe to replace Angular's built in json pipe which implements spacing, avoids circular references. Also includes a component that will pretty print json with syntax highlight", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha spec/*.spec.js" | ||
"test": "mocha spec/*.spec.js", | ||
"build": "./node_modules/.bin/ngc -p ./tsconfig.json" | ||
}, | ||
@@ -28,4 +29,7 @@ "repository": "https://github.com/matiboy/angular2-prettyjson", | ||
"devDependencies": { | ||
"@angular/common": "^2.4.1", | ||
"@angular/compiler": "^2.4.1", | ||
"@angular/compiler-cli": "^2.4.1", | ||
"@angular/platform-server": "^2.4.1", | ||
"chai": "^3.5.0", | ||
"@angular/common": "^2.0.0", | ||
"expect": "^1.20.1", | ||
@@ -45,5 +49,5 @@ "htmltree": "0.0.4", | ||
"ts-loader": "^0.8.2", | ||
"typescript": "^1.8.10", | ||
"typescript": "@2.0.10", | ||
"webpack": "^1.13.1" | ||
} | ||
} |
@@ -1,14 +0,4 @@ | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
var safe_util_1 = require("./safe.util"); | ||
var SafeJsonPipe = (function () { | ||
import { Pipe } from "@angular/core"; | ||
import { serializer } from "./safe.util"; | ||
export var SafeJsonPipe = (function () { | ||
function SafeJsonPipe() { | ||
@@ -18,14 +8,14 @@ } | ||
if (spaces === void 0) { spaces = 2; } | ||
return JSON.stringify(obj, safe_util_1.serializer(), spaces); | ||
return JSON.stringify(obj, serializer(), spaces); | ||
}; | ||
SafeJsonPipe = __decorate([ | ||
core_1.Pipe({ | ||
name: "json", | ||
pure: false | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], SafeJsonPipe); | ||
SafeJsonPipe.decorators = [ | ||
{ type: Pipe, args: [{ | ||
name: "json", | ||
pure: false | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
SafeJsonPipe.ctorParameters = function () { return []; }; | ||
return SafeJsonPipe; | ||
}()); | ||
exports.SafeJsonPipe = SafeJsonPipe; | ||
//# sourceMappingURL=json.pipe.js.map |
@@ -1,32 +0,21 @@ | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
var PrettyJsonComponent = (function () { | ||
import { Component, Input } from "@angular/core"; | ||
export var PrettyJsonComponent = (function () { | ||
function PrettyJsonComponent() { | ||
} | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Object) | ||
], PrettyJsonComponent.prototype, "obj", void 0); | ||
PrettyJsonComponent = __decorate([ | ||
core_1.Component({ | ||
selector: "prettyjson", | ||
template: "\n <pre [innerHtml]=\"obj | prettyjson\">\n </pre>\n ", | ||
styles: [ | ||
"pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }\n :host >>> .string { color: green; }\n :host >>> .number { color: darkorange; }\n :host >>> .boolean { color: blue; }\n :host >>> .null { color: magenta; }\n :host >>> .key { color: red; }" | ||
] | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], PrettyJsonComponent); | ||
PrettyJsonComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: "prettyjson", | ||
template: "\n <pre [innerHtml]=\"obj | prettyjson\">\n </pre>\n ", | ||
styles: [ | ||
"pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }\n :host >>> .string { color: green; }\n :host >>> .number { color: darkorange; }\n :host >>> .boolean { color: blue; }\n :host >>> .null { color: magenta; }\n :host >>> .key { color: red; }" | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PrettyJsonComponent.ctorParameters = function () { return []; }; | ||
PrettyJsonComponent.propDecorators = { | ||
'obj': [{ type: Input },], | ||
}; | ||
return PrettyJsonComponent; | ||
}()); | ||
exports.PrettyJsonComponent = PrettyJsonComponent; | ||
//# sourceMappingURL=prettyjson.component.js.map |
@@ -1,36 +0,26 @@ | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require('@angular/core'); | ||
var prettyjson_component_1 = require('./prettyjson.component'); | ||
var prettyjson_pipe_1 = require('./prettyjson.pipe'); | ||
var json_pipe_1 = require('./json.pipe'); | ||
var PrettyJsonModule = (function () { | ||
import { NgModule } from '@angular/core'; | ||
import { PrettyJsonComponent } from './prettyjson.component'; | ||
import { PrettyJsonPipe } from './prettyjson.pipe'; | ||
import { SafeJsonPipe } from './json.pipe'; | ||
export var PrettyJsonModule = (function () { | ||
function PrettyJsonModule() { | ||
} | ||
PrettyJsonModule = __decorate([ | ||
core_1.NgModule({ | ||
declarations: [ | ||
prettyjson_component_1.PrettyJsonComponent, | ||
prettyjson_pipe_1.PrettyJsonPipe, | ||
json_pipe_1.SafeJsonPipe | ||
], | ||
exports: [ | ||
prettyjson_component_1.PrettyJsonComponent, | ||
prettyjson_pipe_1.PrettyJsonPipe, | ||
json_pipe_1.SafeJsonPipe | ||
] | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], PrettyJsonModule); | ||
PrettyJsonModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [ | ||
PrettyJsonComponent, | ||
PrettyJsonPipe, | ||
SafeJsonPipe | ||
], | ||
exports: [ | ||
PrettyJsonComponent, | ||
PrettyJsonPipe, | ||
SafeJsonPipe | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PrettyJsonModule.ctorParameters = function () { return []; }; | ||
return PrettyJsonModule; | ||
}()); | ||
exports.PrettyJsonModule = PrettyJsonModule; | ||
//# sourceMappingURL=prettyjson.module.js.map |
@@ -1,14 +0,4 @@ | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
var safe_util_1 = require("./safe.util"); | ||
var PrettyJsonPipe = (function () { | ||
import { Pipe } from "@angular/core"; | ||
import { serializer } from "./safe.util"; | ||
export var PrettyJsonPipe = (function () { | ||
function PrettyJsonPipe() { | ||
@@ -18,3 +8,3 @@ } | ||
if (spaces === void 0) { spaces = 2; } | ||
return this._syntaxHighlight(obj, safe_util_1.serializer(), spaces); | ||
return this._syntaxHighlight(obj, serializer(), spaces); | ||
}; | ||
@@ -49,12 +39,12 @@ PrettyJsonPipe.prototype._syntaxHighlight = function (json, serializer, spacing) { | ||
}; | ||
PrettyJsonPipe = __decorate([ | ||
core_1.Pipe({ | ||
name: "prettyjson", | ||
pure: false | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], PrettyJsonPipe); | ||
PrettyJsonPipe.decorators = [ | ||
{ type: Pipe, args: [{ | ||
name: "prettyjson", | ||
pure: false | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PrettyJsonPipe.ctorParameters = function () { return []; }; | ||
return PrettyJsonPipe; | ||
}()); | ||
exports.PrettyJsonPipe = PrettyJsonPipe; | ||
//# sourceMappingURL=prettyjson.pipe.js.map |
@@ -1,4 +0,3 @@ | ||
"use strict"; | ||
// Taken from github.com/isaacs/json-stringify-safe | ||
function serializer() { | ||
export function serializer() { | ||
var stack = []; | ||
@@ -27,3 +26,2 @@ var keys = []; | ||
} | ||
exports.serializer = serializer; | ||
//# sourceMappingURL=safe.util.js.map |
{ | ||
"compilerOptions": { | ||
"noImplicitAny": true, | ||
"module": "commonjs", | ||
"target": "ES5", | ||
"declaration": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"lib": ["es2015", "dom"], | ||
"moduleResolution": "node", | ||
"module": "es2015", | ||
"noImplicitAny": true, | ||
"rootDir": ".", | ||
"sourceMap": true, | ||
"declaration": true | ||
"target": "ES5" | ||
}, | ||
@@ -24,3 +27,7 @@ "files": [ | ||
"rewriteTsconfig": true | ||
}, | ||
"angularCompilerOptions": { | ||
"skipMetadataEmit" : false, | ||
"strictMetadataEmit": true | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33
23776
21
191
1