Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-render-html-once

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-render-html-once - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

2

angular-render-html-once.metadata.json

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

{"__symbolic":"module","version":4,"metadata":{"RenderHtmlOnceComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"render-html-once","template":""}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"htmlContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":55,"context":{"typeName":"Element"},"module":"./lib/render-html-once.component"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"renderFromString":[{"__symbolic":"method"}],"renderFromCacheHit":[{"__symbolic":"method"}]},"statics":{"alreadyRendered":{},"enabled":true}},"RenderHtmlOnceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"exports":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"imports":[]}]}],"members":{}}},"origins":{"RenderHtmlOnceComponent":"./lib/render-html-once.component","RenderHtmlOnceModule":"./lib/render-html-once.module"},"importAs":"angular-render-html-once"}
{"__symbolic":"module","version":4,"metadata":{"RenderHtmlOnceComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"render-html-once","template":""}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5}}]}],"htmlContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":5}}]}],"cacheable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":55,"context":{"typeName":"Element"},"module":"./lib/render-html-once.component"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"renderFromString":[{"__symbolic":"method"}],"renderFromCacheHit":[{"__symbolic":"method"}]},"statics":{"alreadyRendered":{},"enabled":true}},"RenderHtmlOnceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"exports":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"imports":[]}]}],"members":{}}},"origins":{"RenderHtmlOnceComponent":"./lib/render-html-once.component","RenderHtmlOnceModule":"./lib/render-html-once.module"},"importAs":"angular-render-html-once"}

@@ -15,3 +15,18 @@ (function (global, factory) {

this.hostElement = hostElement;
this.enabled = true;
}
Object.defineProperty(RenderHtmlOnceComponent.prototype, "cacheable", {
set: /**
* @param {?} enabled
* @return {?}
*/
function (enabled) {
this.enabled = enabled;
if (!enabled) {
delete RenderHtmlOnceComponent.alreadyRendered[this.id];
}
},
enumerable: true,
configurable: true
});
/**

@@ -24,3 +39,3 @@ * @return {?}

function () {
if (!RenderHtmlOnceComponent.enabled) {
if (!RenderHtmlOnceComponent.enabled || !this.enabled) {
this.renderFromString();

@@ -126,3 +141,4 @@ return;

id: [{ type: core.Input }],
htmlContent: [{ type: core.Input }]
htmlContent: [{ type: core.Input }],
cacheable: [{ type: core.Input }]
};

@@ -142,2 +158,7 @@ return RenderHtmlOnceComponent;

RenderHtmlOnceComponent.enabled;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.prototype.enabled;
/** @type {?} */

@@ -144,0 +165,0 @@ RenderHtmlOnceComponent.prototype.id;

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-render-html-once",["exports","@angular/core"],n):n((e=e||self)["angular-render-html-once"]={},e.ng.core)}(this,(function(e,n){"use strict";var t=function(){function e(e){this.hostElement=e}return e.prototype.ngOnInit=function(){if(e.enabled){var n=e.alreadyRendered[this.id];n?this.renderFromCacheHit(n):this.renderFromString(),e.alreadyRendered[this.id]=this.hostElement.nativeElement}else this.renderFromString()},e.registerServerSideRenderedComponents=function(){if(e.enabled&&window&&window.document&&window.document.getElementsByTagName)for(var n=window.document.getElementsByTagName("render-html-once"),t=0;t<n.length;++t){var r=n[t];e.alreadyRendered[r.id]=r}},e.clearCache=function(){e.alreadyRendered={}},e.enable=function(){e.enabled=!0},e.disable=function(){e.enabled=!1},e.prototype.renderFromString=function(){this.hostElement.nativeElement.innerHTML=this.htmlContent},e.prototype.renderFromCacheHit=function(e){for(;e.childNodes.length;)this.hostElement.nativeElement.appendChild(e.firstChild)},e.alreadyRendered={},e.enabled=!0,e.decorators=[{type:n.Component,args:[{selector:"render-html-once",template:""}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={id:[{type:n.Input}],htmlContent:[{type:n.Input}]},e}();var r=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[t],exports:[t],imports:[]}]}],e}();e.RenderHtmlOnceComponent=t,e.RenderHtmlOnceModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-render-html-once",["exports","@angular/core"],n):n((e=e||self)["angular-render-html-once"]={},e.ng.core)}(this,(function(e,n){"use strict";var t=function(){function e(e){this.hostElement=e,this.enabled=!0}return Object.defineProperty(e.prototype,"cacheable",{set:function(n){this.enabled=n,n||delete e.alreadyRendered[this.id]},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){if(e.enabled&&this.enabled){var n=e.alreadyRendered[this.id];n?this.renderFromCacheHit(n):this.renderFromString(),e.alreadyRendered[this.id]=this.hostElement.nativeElement}else this.renderFromString()},e.registerServerSideRenderedComponents=function(){if(e.enabled&&window&&window.document&&window.document.getElementsByTagName)for(var n=window.document.getElementsByTagName("render-html-once"),t=0;t<n.length;++t){var r=n[t];e.alreadyRendered[r.id]=r}},e.clearCache=function(){e.alreadyRendered={}},e.enable=function(){e.enabled=!0},e.disable=function(){e.enabled=!1},e.prototype.renderFromString=function(){this.hostElement.nativeElement.innerHTML=this.htmlContent},e.prototype.renderFromCacheHit=function(e){for(;e.childNodes.length;)this.hostElement.nativeElement.appendChild(e.firstChild)},e.alreadyRendered={},e.enabled=!0,e.decorators=[{type:n.Component,args:[{selector:"render-html-once",template:""}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={id:[{type:n.Input}],htmlContent:[{type:n.Input}],cacheable:[{type:n.Input}]},e}();var r=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[t],exports:[t],imports:[]}]}],e}();e.RenderHtmlOnceComponent=t,e.RenderHtmlOnceModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=angular-render-html-once.umd.min.js.map

@@ -13,8 +13,19 @@ /**

this.hostElement = hostElement;
this.enabled = true;
}
/**
* @param {?} enabled
* @return {?}
*/
set cacheable(enabled) {
this.enabled = enabled;
if (!enabled) {
delete RenderHtmlOnceComponent.alreadyRendered[this.id];
}
}
/**
* @return {?}
*/
ngOnInit() {
if (!RenderHtmlOnceComponent.enabled) {
if (!RenderHtmlOnceComponent.enabled || !this.enabled) {
this.renderFromString();

@@ -100,3 +111,4 @@ return;

id: [{ type: Input }],
htmlContent: [{ type: Input }]
htmlContent: [{ type: Input }],
cacheable: [{ type: Input }]
};

@@ -114,2 +126,7 @@ if (false) {

RenderHtmlOnceComponent.enabled;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.prototype.enabled;
/** @type {?} */

@@ -125,2 +142,2 @@ RenderHtmlOnceComponent.prototype.id;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlbmRlci1odG1sLW9uY2UvIiwic291cmNlcyI6WyJsaWIvcmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7QUFNbkUsTUFBTSxPQUFPLHVCQUF1Qjs7OztJQU9oQyxZQUEyQixXQUFnQztRQUFoQyxnQkFBVyxHQUFYLFdBQVcsQ0FBcUI7SUFBRyxDQUFDOzs7O0lBRXhELFFBQVE7UUFDWCxJQUFJLENBQUMsdUJBQXVCLENBQUMsT0FBTyxFQUFFO1lBQ2xDLElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO1lBQ3hCLE9BQU87U0FDVjs7Y0FDSyxRQUFRLEdBQUcsdUJBQXVCLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7UUFDakUsSUFBSSxRQUFRLEVBQUU7WUFDVixJQUFJLENBQUMsa0JBQWtCLENBQUMsUUFBUSxDQUFDLENBQUM7U0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ZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuZW5hYmxlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBkaXNhYmxlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5lbmFibGVkID0gZmFsc2U7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSByZW5kZXJGcm9tU3RyaW5nKCk6IHZvaWQge1xuICAgICAgICB0aGlzLmhvc3RFbGVtZW50Lm5hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gdGhpcy5odG1sQ29udGVudDtcbiAgICB9XG5cbiAgICBwcml2YXRlIHJlbmRlckZyb21DYWNoZUhpdChjYWNoZUhpdDogRWxlbWVudCk6IHZvaWQge1xuICAgICAgICB3aGlsZSAoY2FjaGVIaXQuY2hpbGROb2Rlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRoaXMuaG9zdEVsZW1lbnQubmF0aXZlRWxlbWVudC5hcHBlbmRDaGlsZChjYWNoZUhpdC5maXJzdENoaWxkKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==

@@ -10,3 +10,18 @@ /**

this.hostElement = hostElement;
this.enabled = true;
}
Object.defineProperty(RenderHtmlOnceComponent.prototype, "cacheable", {
set: /**
* @param {?} enabled
* @return {?}
*/
function (enabled) {
this.enabled = enabled;
if (!enabled) {
delete RenderHtmlOnceComponent.alreadyRendered[this.id];
}
},
enumerable: true,
configurable: true
});
/**

@@ -19,3 +34,3 @@ * @return {?}

function () {
if (!RenderHtmlOnceComponent.enabled) {
if (!RenderHtmlOnceComponent.enabled || !this.enabled) {
this.renderFromString();

@@ -121,3 +136,4 @@ return;

id: [{ type: Input }],
htmlContent: [{ type: Input }]
htmlContent: [{ type: Input }],
cacheable: [{ type: Input }]
};

@@ -138,2 +154,7 @@ return RenderHtmlOnceComponent;

RenderHtmlOnceComponent.enabled;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.prototype.enabled;
/** @type {?} */

@@ -149,2 +170,2 @@ RenderHtmlOnceComponent.prototype.id;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlbmRlci1odG1sLW9uY2UvIiwic291cmNlcyI6WyJsaWIvcmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7QUFFbkU7SUFXSSxpQ0FBMkIsV0FBZ0M7UUFBaEMsZ0JBQVcsR0FBWCxXQUFXLENBQXFCO0lBQUcsQ0FBQzs7OztJQUV4RCwwQ0FBUTs7O0lBQWY7UUFDSSxJQUFJLENBQUMsdUJBQXVCLENBQUMsT0FBTyxFQUFFO1lBQ2xDLElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO1lBQ3hCLE9BQU87U0FDVjs7WUFDSyxRQUFRLEdBQUcsdUJBQXVCLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7UUFDakUsSUFBSSxRQUFRLEVBQUU7WUFDVixJQUFJLENBQUMsa0JBQWtCLENBQUMsUUFBUSxDQUFDLENBQUM7U0FDckM7YUFBTTtZQUNILElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO1NBQzNCO1FBQ0QsdUJBQXVCLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDLGFBQWEsQ0FBQztJQUN0RixDQUFDOzs7O0lBRWEsNERBQW9DOzs7SUFBbEQ7UUFDSSxJQUFJLENBQUMsdUJBQXVCLENBQUM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IChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBlbGVtZW50c1tpXTtcbiAgICAgICAgICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5hbHJlYWR5UmVuZGVyZWRbZWxlbWVudC5pZF0gPSBlbGVtZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBjbGVhckNhY2hlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5hbHJlYWR5UmVuZGVyZWQgPSB7fTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGVuYWJsZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuZW5hYmxlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBkaXNhYmxlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5lbmFibGVkID0gZmFsc2U7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSByZW5kZXJGcm9tU3RyaW5nKCk6IHZvaWQge1xuICAgICAgICB0aGlzLmhvc3RFbGVtZW50Lm5hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gdGhpcy5odG1sQ29udGVudDtcbiAgICB9XG5cbiAgICBwcml2YXRlIHJlbmRlckZyb21DYWNoZUhpdChjYWNoZUhpdDogRWxlbWVudCk6IHZvaWQge1xuICAgICAgICB3aGlsZSAoY2FjaGVIaXQuY2hpbGROb2Rlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRoaXMuaG9zdEVsZW1lbnQubmF0aXZlRWxlbWVudC5hcHBlbmRDaGlsZChjYWNoZUhpdC5maXJzdENoaWxkKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
//# sourceMappingURL=data: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1xuICAgIH1cblxuICAgIHB1YmxpYyBzdGF0aWMgZGlzYWJsZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuZW5hYmxlZCA9IGZhbHNlO1xuICAgIH1cblxuICAgIHByaXZhdGUgcmVuZGVyRnJvbVN0cmluZygpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5ob3N0RWxlbWVudC5uYXRpdmVFbGVtZW50LmlubmVySFRNTCA9IHRoaXMuaHRtbENvbnRlbnQ7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSByZW5kZXJGcm9tQ2FjaGVIaXQoY2FjaGVIaXQ6IEVsZW1lbnQpOiB2b2lkIHtcbiAgICAgICAgd2hpbGUgKGNhY2hlSGl0LmNoaWxkTm9kZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLmhvc3RFbGVtZW50Lm5hdGl2ZUVsZW1lbnQuYXBwZW5kQ2hpbGQoY2FjaGVIaXQuZmlyc3RDaGlsZCk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=

@@ -14,8 +14,19 @@ import { Component, ElementRef, Input, NgModule } from '@angular/core';

this.hostElement = hostElement;
this.enabled = true;
}
/**
* @param {?} enabled
* @return {?}
*/
set cacheable(enabled) {
this.enabled = enabled;
if (!enabled) {
delete RenderHtmlOnceComponent.alreadyRendered[this.id];
}
}
/**
* @return {?}
*/
ngOnInit() {
if (!RenderHtmlOnceComponent.enabled) {
if (!RenderHtmlOnceComponent.enabled || !this.enabled) {
this.renderFromString();

@@ -101,3 +112,4 @@ return;

id: [{ type: Input }],
htmlContent: [{ type: Input }]
htmlContent: [{ type: Input }],
cacheable: [{ type: Input }]
};

@@ -115,2 +127,7 @@ if (false) {

RenderHtmlOnceComponent.enabled;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.prototype.enabled;
/** @type {?} */

@@ -117,0 +134,0 @@ RenderHtmlOnceComponent.prototype.id;

@@ -11,3 +11,18 @@ import { Component, ElementRef, Input, NgModule } from '@angular/core';

this.hostElement = hostElement;
this.enabled = true;
}
Object.defineProperty(RenderHtmlOnceComponent.prototype, "cacheable", {
set: /**
* @param {?} enabled
* @return {?}
*/
function (enabled) {
this.enabled = enabled;
if (!enabled) {
delete RenderHtmlOnceComponent.alreadyRendered[this.id];
}
},
enumerable: true,
configurable: true
});
/**

@@ -20,3 +35,3 @@ * @return {?}

function () {
if (!RenderHtmlOnceComponent.enabled) {
if (!RenderHtmlOnceComponent.enabled || !this.enabled) {
this.renderFromString();

@@ -122,3 +137,4 @@ return;

id: [{ type: Input }],
htmlContent: [{ type: Input }]
htmlContent: [{ type: Input }],
cacheable: [{ type: Input }]
};

@@ -138,2 +154,7 @@ return RenderHtmlOnceComponent;

RenderHtmlOnceComponent.enabled;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.prototype.enabled;
/** @type {?} */

@@ -140,0 +161,0 @@ RenderHtmlOnceComponent.prototype.id;

@@ -6,4 +6,6 @@ import { ElementRef, OnInit } from '@angular/core';

private static enabled;
private enabled;
id: string;
htmlContent: string;
cacheable: boolean;
constructor(hostElement: ElementRef<Element>);

@@ -10,0 +12,0 @@ ngOnInit(): void;

{
"name": "angular-render-html-once",
"version": "1.1.2",
"description": "Anuglar helper component for HTML string that should be rendered once and maintaned later",
"version": "1.2.0",
"description": "Angular helper component for HTML string that should be rendered once and maintaned later",
"homepage": "https://github.com/bushee/angular-render-html-once",

@@ -6,0 +6,0 @@ "repository": {

@@ -24,4 +24,5 @@ # angular-render-html-once

- `htmlContent` **required** - HTML content string you wish to have embedded within component
- `cacheable` _(optional; default: `true`)_ - allows enabling/disabling caching of specific `<render-html-once>` instance; turning it off in runtime also clears instance-related cache
### Requirements
- angular ^8.0.0

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

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