New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular2-prettyjson

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-prettyjson - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

4

package.json
{
"name": "angular2-prettyjson",
"version": "2.0.3",
"version": "2.0.4",
"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",

@@ -48,5 +48,5 @@ "main": "index.js",

"ts-loader": "^0.8.2",
"typescript": "@2.0.10",
"typescript": "2.2.1",
"webpack": "^1.13.1"
}
}

@@ -1,2 +0,2 @@

# Angular 2 Pretty Json v2.0.2
# Angular 2 Pretty Json v2.0.4

@@ -124,2 +124,3 @@ A module for Angular 2 debug output of objects. Contains a pipe similar to [JsonPipe](https://angular.io/docs/ts/latest/api/common/index/JsonPipe-class.html) but adds support for spacing and handling of circular structures.

```css
pre span {white-space: normal;}
.string { color: green; }

@@ -132,2 +133,17 @@ .number { color: darkorange; }

If you wish to use the `styles` property of the parent component, please prefix each class selector with `:host /deep/`
e.g.
```js
@Component({
....
template: `
<pre [innerHtml]="circularObj | prettyjson:3"></pre>
`,
styles: [`:host /deep/ .string {color:green} ...`]
})
...
```
See output under component below.

@@ -163,3 +179,3 @@

1. Added UMD bundles. Fixes issue #8
1. Update README
1. Added style to wrap text. Closes #11
1. Update README

@@ -0,21 +1,30 @@

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);
};
import { Component, Input } from "@angular/core";
export var PrettyJsonComponent = (function () {
var PrettyJsonComponent = (function () {
function 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;
}());
__decorate([
Input(),
__metadata("design:type", Object)
], PrettyJsonComponent.prototype, "obj", void 0);
PrettyJsonComponent = __decorate([
Component({
selector: "prettyjson",
template: "\n <pre [innerHtml]=\"obj | prettyjson\">\n </pre>\n ",
styles: [
"pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }\n :host >>> span {white-space: normal;}\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; }"
]
})
], PrettyJsonComponent);
export { PrettyJsonComponent };
//# sourceMappingURL=prettyjson.component.js.map

@@ -19,3 +19,3 @@ (function (factory) {

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; }"
"pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }\n :host >>> span { white-space: normal; }\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; }"
]

@@ -33,2 +33,2 @@ },] },

});
//# sourceMappingURL=prettyjson.component.js.map
//# sourceMappingURL=prettyjson.component.js.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc