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

ng2-webstorage

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-webstorage - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

1

dist/constants/lib.d.ts
export declare const LIB_KEY: string;
export declare const LIB_KEY_SEPARATOR: string;
export declare const STORAGE_NAMES: {};
"use strict";
var storage_1 = require('../enums/storage');
exports.LIB_KEY = 'ng2-webstorage';
exports.LIB_KEY_SEPARATOR = '|';
exports.STORAGE_NAMES = (_a = {},

@@ -5,0 +6,0 @@ _a[storage_1.STORAGE.local] = 'local',

@@ -6,2 +6,3 @@ import { IWebStorage } from '../interfaces/webStorage';

static setStorageKeyPrefix(key?: string): void;
static setStorageKeySeparator(separator?: string): void;
}
"use strict";
var lib_1 = require('../constants/lib');
var CUSTOM_LIB_KEY = lib_1.LIB_KEY;
var CUSTOM_LIB_KEY_SEPARATOR = lib_1.LIB_KEY_SEPARATOR;
var KeyStorageHelper = (function () {

@@ -13,3 +14,3 @@ function KeyStorageHelper() {

throw Error('attempt to generate a storage key with a non string value');
return CUSTOM_LIB_KEY + "|" + raw.toString().toLowerCase();
return "" + CUSTOM_LIB_KEY + CUSTOM_LIB_KEY_SEPARATOR + raw.toString().toLowerCase();
};

@@ -20,2 +21,6 @@ KeyStorageHelper.setStorageKeyPrefix = function (key) {

};
KeyStorageHelper.setStorageKeySeparator = function (separator) {
if (separator === void 0) { separator = lib_1.LIB_KEY_SEPARATOR; }
CUSTOM_LIB_KEY_SEPARATOR = separator;
};
return KeyStorageHelper;

@@ -22,0 +27,0 @@ }());

2

dist/services/webStorage.d.ts

@@ -6,3 +6,3 @@ import { EventEmitter } from '@angular/core';

private sType;
constructor(sType: STORAGE);
constructor(sType?: STORAGE);
store(raw: string, value: any): void;

@@ -9,0 +9,0 @@ retrieve(raw: string): any;

@@ -5,4 +5,5 @@ "use strict";

function WebStorageService(sType) {
this.sType = null;
if (sType === void 0) { sType = null; }
this.sType = sType;
this.sType = sType;
}

@@ -9,0 +10,0 @@ WebStorageService.prototype.store = function (raw, value) {

{
"name": "ng2-webstorage",
"version": "1.2.4",
"version": "1.2.5",
"description": "angular2 webstorage manager",

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

@@ -19,3 +19,3 @@ # ng2-webstorage

* [Helpers](#helpers):
* [@KeyStorageHelper](#h_keystorage)
* [KeyStorageHelper](#h_keystorage)
* [Modify and build](#modifBuild)

@@ -290,6 +290,6 @@

#### setStorageKeyPrefix( key:`string` ):`void`
> set the string used as prefix in the storage's item names
> set the string used as prefix in the storage's item names.
##### Params:
- **key**: String. prefix.
- **key**: String. prefix. default to 'ng2-webstorage'

@@ -304,3 +304,17 @@ ##### Usage:

#### setStorageKeySeparator( separator:`string` ):`void`
> set the string used as separator in the storage's item names
##### Params:
- **key**: String. prefix. default to '|'
##### Usage:
````typescript
import {KeyStorageHelper} from 'ng2-webstorage';
KeyStorageHelper.setStorageKeySeparator('.');
````
### <a name="modifBuild">Modify and build</a>

@@ -307,0 +321,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

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