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

angular2-locker

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-locker - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

16

dist/locker.js

@@ -121,7 +121,7 @@ (function webpackUniversalModuleDefinition(root, factory) {

var driverNamespace = lockerConfig.driverNamespace;
this.lockerConfig = lockerConfig;
var defaultDriverType = lockerConfig.defaultDriverType;
var namespaceSeparator = lockerConfig.namespaceSeparator;
this.setNamespace(driverNamespace, namespaceSeparator);
this.setNamespace();
this.setSeparator();
this.driver = defaultDriverType.isSupported() ? defaultDriverType : Driver_1.DRIVERS.MEMORY;

@@ -132,4 +132,12 @@ }

key: "setNamespace",
value: function setNamespace(namespace, separator) {
value: function setNamespace() {
var namespace = arguments.length <= 0 || arguments[0] === undefined ? this.lockerConfig.driverNamespace : arguments[0];
this.namespace = namespace;
}
}, {
key: "setSeparator",
value: function setSeparator() {
var separator = arguments.length <= 0 || arguments[0] === undefined ? this.lockerConfig.namespaceSeparator : arguments[0];
this.separator = separator;

@@ -136,0 +144,0 @@ }

@@ -23,7 +23,2 @@ export interface IStorage {

export abstract class AbstractLockerConfig {
public driverNamespace: string
public defaultDriverType: Driver
}
export class MemoryStorage implements IStorage {

@@ -59,4 +54,5 @@ hasOwnProperty(key: any): boolean

defaultDriverType: Driver
namespaceSeparator: string
constructor(driverNamespace?: string, defaultDriverType?: Driver)
constructor(driverNamespace?: string, defaultDriverType?: Driver, namespaceSeparator?: string)
}

@@ -75,2 +71,3 @@

setNamespace(namespace?: string): void
setSeparator(separator?: string): void
useDriver(driver: Driver): Locker

@@ -77,0 +74,0 @@ set(key: any, data: any, expiry?: any): void

{
"name": "angular2-locker",
"version": "0.4.1",
"version": "0.5.0",
"description": "angular2 library for managing session and locker storage, has backup for inmemory if neither are supported",

@@ -5,0 +5,0 @@ "main": "dist/locker.js",

@@ -74,3 +74,9 @@ angular2-locker

`locker.setNamespace('myName')`
`locker.setNamespace()` - Resets to lockerConfig default
####`setSeparator`
`locker.setSeparator('-')`
`locker.setSeparator()` - Resets to lockerConfig default
####`useDriver`

@@ -77,0 +83,0 @@ ```typescript

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