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

casbin

Package Overview
Dependencies
Maintainers
3
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

casbin - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

15

lib/model/model.js

@@ -26,2 +26,3 @@ "use strict";

const util = require("../util");
const j = require("jscodeshift");
const config_1 = require("../config");

@@ -84,2 +85,16 @@ const assertion_1 = require("./assertion");

}
else if (sec === 'm') {
const mAST = j(util.removeComments(value));
let hasEscape = false;
mAST.find(j.Literal).forEach(path => {
let n = path.value.value;
if (typeof n === 'string' && n.includes('.')) {
hasEscape = true;
n = n.replace(/\./g, '\\.');
j(path).replaceWith(j.literal(n));
}
});
value = util.escapeAssertion(mAST.toSource());
ast.value = hasEscape ? value.replace(/\\\\./g, '.') : value;
}
else {

@@ -86,0 +101,0 @@ ast.value = util.removeComments(util.escapeAssertion(value));

4

package.json
{
"name": "casbin",
"version": "3.0.0",
"version": "3.0.1",
"description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS",

@@ -18,2 +18,3 @@ "main": "lib/index.js",

"@types/jest": "^24.0.11",
"@types/jscodeshift": "^0.6.0",
"@types/lodash": "^4.14.113",

@@ -34,2 +35,3 @@ "@types/node": "^10.5.3",

"ip": "^1.1.5",
"jscodeshift": "^0.6.4",
"lodash": "^4.17.10"

@@ -36,0 +38,0 @@ },

@@ -23,2 +23,14 @@ # node-Casbin

## All the languages supported by Casbin:
[![golang](https://casbin.org/img/langs/golang.png)](https://github.com/casbin/casbin) | [![java](https://casbin.org/img/langs/java.png)](https://github.com/casbin/jcasbin) | [![nodejs](https://casbin.org/img/langs/nodejs.png)](https://github.com/casbin/node-casbin) | [![php](https://casbin.org/img/langs/php.png)](https://github.com/php-casbin/php-casbin)
----|----|----|----
[Casbin](https://github.com/casbin/casbin) | [jCasbin](https://github.com/casbin/jcasbin) | [node-Casbin](https://github.com/casbin/node-casbin) | [PHP-Casbin](https://github.com/php-casbin/php-casbin)
production-ready | production-ready | production-ready | production-ready
[![python](https://casbin.org/img/langs/python.png)](https://github.com/casbin/pycasbin) | [![dotnet](https://casbin.org/img/langs/dotnet.png)](https://github.com/casbin-net/Casbin.NET) | [![delphi](https://casbin.org/img/langs/delphi.png)](https://github.com/casbin4d/Casbin4D) | [![rust](https://casbin.org/img/langs/rust.png)](https://github.com/Devolutions/casbin-rs)
----|----|----|----
[PyCasbin](https://github.com/casbin/pycasbin) | [Casbin.NET](https://github.com/casbin-net/Casbin.NET) | [Casbin4D](https://github.com/casbin4d/Casbin4D) | [Casbin-RS](https://github.com/Devolutions/casbin-rs)
production-ready | production-ready | experimental | WIP
## Installation

@@ -25,0 +37,0 @@

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