0.1.8 • Published 3 years ago

eazyl v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

EazyL

Eazyl is a very simple ACL (Access Control List) implementation.

Version License Downloads Filesize Build Status Coveralls GitHub

   

Installation

Install with npm

npm install --save eazyl

Install with yarn

yarn add eazyl

   

Usage

Simply:

import createRole, { checkIf } from 'eazyl';

createRole('people').can('eat')('food');

checkIf('people').can('eat')('food'); // true
checkIf('people').can('have')('wings'); // false

Conditionally:

import { a, checkIf } from 'eazyl';

a('person').can('buy')('phone').when(phone => phone.price < 800);

const iPhone = {
    model: 'x-tra x-pensive',
    price: 2999,
};

checkIf('person').can('buy')('phone').with(iPhone); // false

   

License

MIT

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago