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

@casl/angular

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@casl/angular - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

casl-angular-0.4.0.tgz

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Change Log

# [@casl/angular-v0.4.1](https://github.com/stalniy/casl/compare/@casl/angular@0.4.0...@casl/angular@0.4.1) (2018-11-11)
### Bug Fixes
* **angular:** makes `field` to be optional argument ([a3eec63](https://github.com/stalniy/casl/commit/a3eec63)), closes [#126](https://github.com/stalniy/casl/issues/126)
# [@casl/angular-v0.4.0](https://github.com/stalniy/casl/compare/@casl/angular@0.3.1...@casl/angular@0.4.0) (2018-11-11)

@@ -7,0 +14,0 @@

6

dist/es5m/index.js

@@ -60,6 +60,4 @@ import { Pipe, ChangeDetectorRef, NgModule } from '@angular/core';

CanPipe.prototype.can = function can() {
var _ability;
return (_ability = this.ability).can.apply(_ability, arguments);
CanPipe.prototype.can = function can(action, subject, field) {
return this.ability.can(action, subject, field);
};

@@ -66,0 +64,0 @@

@@ -46,4 +46,4 @@ import { Pipe, ChangeDetectorRef, NgModule } from '@angular/core';

}
can(...args) {
return this.ability.can(...args);
can(action, subject, field) {
return this.ability.can(action, subject, field);
}

@@ -50,0 +50,0 @@ ngOnDestroy() {

@@ -8,5 +8,5 @@ import { ChangeDetectorRef } from '@angular/core';

constructor(ability: Ability, cd: ChangeDetectorRef);
transform(resource: any, action: string, field: string): boolean;
can(...args: [string, any, string?]): boolean;
transform(resource: any, action: string, field?: string): boolean;
can(action: string, subject: any, field?: string): boolean;
ngOnDestroy(): void;
}

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@casl/ability")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@casl/ability"],t):t((e.casl=e.casl||{},e.casl.ng={}),e.ng.core,e.casl)}(this,function(e,t,i){"use strict";function n(e,t,i,n){var r,o=arguments.length,c=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(c=(o<3?r(c):3<o?r(t,i,c):r(t,i))||c);return 3<o&&c&&Object.defineProperty(t,i,c),c}var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){},c=o;function a(){return new i.Ability([])}e.CanPipe=function(){function i(e,t){r(this,i),this.ability=e,this.cd=t,this.unsubscribeFromAbility=o}return i.prototype.transform=function(e,t,i){var n=this;return this.unsubscribeFromAbility===o&&(this.unsubscribeFromAbility=this.ability.on("updated",function(){return n.cd.markForCheck()})),this.can(t,e,i)},i.prototype.can=function(){var e;return(e=this.ability).can.apply(e,arguments)},i.prototype.ngOnDestroy=function(){this.unsubscribeFromAbility()},i}(),e.CanPipe=n([t.Pipe({name:"can",pure:!1}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[i.Ability,t.ChangeDetectorRef])],e.CanPipe),e.AbilityModule=function e(){r(this,e)},e.AbilityModule=n([t.NgModule({declarations:[e.CanPipe],exports:[e.CanPipe],providers:[{provide:i.Ability,useFactory:a}]})],e.AbilityModule),e.ɵ0=c,e.createAbility=a,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@casl/ability")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@casl/ability"],t):t((e.casl=e.casl||{},e.casl.ng={}),e.ng.core,e.casl)}(this,function(e,t,i){"use strict";function n(e,t,i,n){var r,o=arguments.length,c=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(c=(o<3?r(c):3<o?r(t,i,c):r(t,i))||c);return 3<o&&c&&Object.defineProperty(t,i,c),c}var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){},c=o;function a(){return new i.Ability([])}e.CanPipe=function(){function i(e,t){r(this,i),this.ability=e,this.cd=t,this.unsubscribeFromAbility=o}return i.prototype.transform=function(e,t,i){var n=this;return this.unsubscribeFromAbility===o&&(this.unsubscribeFromAbility=this.ability.on("updated",function(){return n.cd.markForCheck()})),this.can(t,e,i)},i.prototype.can=function(e,t,i){return this.ability.can(e,t,i)},i.prototype.ngOnDestroy=function(){this.unsubscribeFromAbility()},i}(),e.CanPipe=n([t.Pipe({name:"can",pure:!1}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[i.Ability,t.ChangeDetectorRef])],e.CanPipe),e.AbilityModule=function e(){r(this,e)},e.AbilityModule=n([t.NgModule({declarations:[e.CanPipe],exports:[e.CanPipe],providers:[{provide:i.Ability,useFactory:a}]})],e.AbilityModule),e.ɵ0=c,e.createAbility=a,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "@casl/angular",
"version": "0.4.0",
"version": "0.4.1",
"description": "Angular module for CASL which makes it easy to add permissions in any Angular application",

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

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