ng7-storage
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -10,3 +10,3 @@ (function (global, factory) { | ||
if ((typeof window.sessionStorage == 'undefined')) { | ||
console.error('your browser dont support ng-storage, Please update your browser'); | ||
console.error("your browser doesn't support ng-storage, Please update your browser"); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ng7-storage",["exports","@angular/core"],t):t((e=e||self)["ng7-storage"]={},e.ng.core)}(this,(function(e,t){"use strict";var o=function(){function e(){void 0===window.sessionStorage&&console.error("your browser dont support ng-storage, Please update your browser")}return e.prototype.setData=function(e){return!!e.key&&(e.encrypt?sessionStorage.setItem(e.key.toString().toLowerCase(),window.btoa(JSON.stringify(e.value))):sessionStorage.setItem(e.key.toString().toLowerCase(),JSON.stringify(e.value)),!0)},e.prototype.getData=function(e){return e.decrypt?window.atob(JSON.parse(sessionStorage.getItem(e.key.toString().toLowerCase()))):JSON.parse(sessionStorage.getItem(e.key.toString().toLowerCase()))},e.prototype.removeData=function(e){sessionStorage.removeItem(e.toString().toLowerCase())},e.prototype.removeAll=function(){sessionStorage.clear()},e}();o.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new o},token:o,providedIn:"root"}),o.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[]};var r=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();r.decorators=[{type:t.Component,args:[{selector:"lib-storage",template:"\n <p>\n storage works!\n </p>\n "}]}],r.ctorParameters=function(){return[]};var n=function(){};n.decorators=[{type:t.NgModule,args:[{declarations:[r],imports:[],exports:[r]}]}],e.NgStorageService=o,e.StorageComponent=r,e.StorageModule=n,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ng7-storage",["exports","@angular/core"],t):t((e=e||self)["ng7-storage"]={},e.ng.core)}(this,(function(e,t){"use strict";var o=function(){function e(){void 0===window.sessionStorage&&console.error("your browser doesn't support ng-storage, Please update your browser")}return e.prototype.setData=function(e){return!!e.key&&(e.encrypt?sessionStorage.setItem(e.key.toString().toLowerCase(),window.btoa(JSON.stringify(e.value))):sessionStorage.setItem(e.key.toString().toLowerCase(),JSON.stringify(e.value)),!0)},e.prototype.getData=function(e){return e.decrypt?window.atob(JSON.parse(sessionStorage.getItem(e.key.toString().toLowerCase()))):JSON.parse(sessionStorage.getItem(e.key.toString().toLowerCase()))},e.prototype.removeData=function(e){sessionStorage.removeItem(e.toString().toLowerCase())},e.prototype.removeAll=function(){sessionStorage.clear()},e}();o.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new o},token:o,providedIn:"root"}),o.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[]};var r=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();r.decorators=[{type:t.Component,args:[{selector:"lib-storage",template:"\n <p>\n storage works!\n </p>\n "}]}],r.ctorParameters=function(){return[]};var n=function(){};n.decorators=[{type:t.NgModule,args:[{declarations:[r],imports:[],exports:[r]}]}],e.NgStorageService=o,e.StorageComponent=r,e.StorageModule=n,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ng7-storage.umd.min.js.map |
@@ -0,0 +0,0 @@ import { Component } from '@angular/core'; |
@@ -0,0 +0,0 @@ import { NgModule } from '@angular/core'; |
@@ -6,3 +6,3 @@ import { Injectable } from '@angular/core'; | ||
if ((typeof window.sessionStorage == 'undefined')) { | ||
console.error('your browser dont support ng-storage, Please update your browser'); | ||
console.error(`your browser doesn't support ng-storage, Please update your browser`); | ||
} | ||
@@ -46,2 +46,2 @@ } | ||
NgStorageService.ctorParameters = () => []; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS5zZXJ2aWNlL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NlXG4gICAgfVxuXG4gIH1cblxuICBnZXREYXRhKGRhdGE6IGRhdGFGb3JtYXQpIHtcbiAgICBpZiAoZGF0YS5kZWNyeXB0KSB7XG4gICAgICByZXR1cm4gd2luZG93LmF0b2IoSlNPTi5wYXJzZShzZXNzaW9uU3RvcmFnZS5nZXRJdGVtKGRhdGEua2V5LnRvU3RyaW5nKCkudG9Mb3dlckNhc2UoKSkpKTtcblxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gSlNPTi5wYXJzZShzZXNzaW9uU3RvcmFnZS5nZXRJdGVtKGRhdGEua2V5LnRvU3RyaW5nKCkudG9Mb3dlckNhc2UoKSkpO1xuICAgIH1cbiAgfVxuXG4gIHJlbW92ZURhdGEoa2V5KSB7XG4gICAgc2Vzc2lvblN0b3JhZ2UucmVtb3ZlSXRlbShrZXkudG9TdHJpbmcoKS50b0xvd2VyQ2FzZSgpKTtcbiAgfVxuXG4gIHJlbW92ZUFsbCgpIHtcbiAgICBzZXNzaW9uU3RvcmFnZS5jbGVhcigpO1xuICB9XG59XG4iXX0= |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /* |
@@ -6,3 +6,3 @@ import { ɵɵdefineInjectable, Injectable, Component, NgModule } from '@angular/core'; | ||
if ((typeof window.sessionStorage == 'undefined')) { | ||
console.error('your browser dont support ng-storage, Please update your browser'); | ||
console.error(`your browser doesn't support ng-storage, Please update your browser`); | ||
} | ||
@@ -9,0 +9,0 @@ } |
@@ -0,0 +0,0 @@ import { OnInit } from '@angular/core'; |
export declare class StorageModule { | ||
} |
@@ -0,0 +0,0 @@ export interface dataFormat { |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "ng7-storage", | ||
"version": "1.1.3", | ||
"description": "cookie less browser storage for angular", | ||
"version": "1.1.4", | ||
"description": "Store data in browser in more secure way using browser Session", | ||
"keywords": [ | ||
"Angular", | ||
"Library", | ||
"storage", | ||
"browser storage", | ||
"session" | ||
"Storage", | ||
"browser Storage", | ||
"Session Storage" | ||
], | ||
@@ -31,2 +31,2 @@ "repository": { | ||
"sideEffects": false | ||
} | ||
} |
export * from './lib/storage.service'; | ||
export * from './lib/storage.component'; | ||
export * from './lib/storage.module'; |
@@ -0,0 +0,0 @@ # ng-storage |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
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
14
1
41569