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.3.0 to 0.3.1

14

dist/locker.js

@@ -223,2 +223,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var defaultDriverType = arguments.length <= 1 || arguments[1] === undefined ? exports.DRIVERS.SESSION : arguments[1];
var namespaceSeparator = arguments.length <= 2 || arguments[2] === undefined ? ':' : arguments[2];

@@ -229,4 +230,5 @@ _classCallCheck(this, LockerConfig);

this.defaultDriverType = defaultDriverType;
this.namespaceSeparator = namespaceSeparator;
};
LockerConfig = __decorate([core_1.Injectable(), __param(0, core_1.Optional()), __param(1, core_1.Optional()), __metadata('design:paramtypes', [String, Driver_1.Driver])], LockerConfig);
LockerConfig = __decorate([core_1.Injectable(), __param(0, core_1.Optional()), __param(1, core_1.Optional()), __param(2, core_1.Optional()), __metadata('design:paramtypes', [String, Driver_1.Driver, String])], LockerConfig);
exports.LockerConfig = LockerConfig;

@@ -240,4 +242,5 @@ var Locker_1 = void 0;

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

@@ -250,4 +253,6 @@ }

var namespace = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
var separator = arguments.length <= 1 || arguments[1] === undefined ? ':' : arguments[1];
this.namespace = namespace;
this.separator = separator;
}

@@ -259,3 +264,4 @@ }, {

defaultDriverType: driver.isSupported() ? driver : exports.DRIVERS.MEMORY,
driverNamespace: this.namespace
driverNamespace: this.namespace,
namespaceSeparator: this.separator
});

@@ -296,3 +302,3 @@ }

value: function _makeKey(key) {
return this.namespace ? this.namespace + ":" + key : key;
return this.namespace ? "" + this.namespace + this.separator + key : key;
}

@@ -299,0 +305,0 @@ }]);

{
"name": "angular2-locker",
"version": "0.3.0",
"version": "0.3.1",
"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",

@@ -24,2 +24,7 @@ angular2-locker

// LockerConfig also has an optional namespace separator (defaults to :)
bootstrap(App, [provide(LockerConfig, {
useValue: new LockerConfig('MyNamespace', Locker.DRIVERS.LOCAL, '.') // Values will be stored as **MyNamespace.myKey**
})), Locker])
class App {

@@ -26,0 +31,0 @@ constructor(private locker: Locker) {}

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