# eazyl

> Simple Access Control Lists

Latest version **0.1.8** (published 2021-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install eazyl
pnpm add eazyl
yarn add eazyl
bun add eazyl
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2021-01-18 |
| First published | 2019-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 22 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mostafa |
| Maintainers | teefouad |
| Keywords | acl, server, web, node, javascript |

## Links

- npm: https://www.npmjs.com/package/eazyl
- Repository: https://github.com/%3Cgithub-username%3E/eazyl
- Homepage: https://github.com/<github-username>/eazyl#readme
- Issues: https://github.com/<github-username>/eazyl/issues
- npm.io page: https://npm.io/package/eazyl

## Dependencies (2)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.5.5
- [@babel/plugin-proposal-optional-chaining](https://npm.io/package/@babel/plugin-proposal-optional-chaining.md) ^7.12.7

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2021-01-18
- 0.1.7 — 2021-01-18
- 0.1.6 — 2019-08-22
- 0.1.5 — 2019-08-22
- 0.1.4 — 2019-08-22
- 0.1.2 — 2019-08-21
- 0.1.1 — 2019-08-21
- 0.1.0 — 2019-08-21

## README

# EazyL

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

[![Version](https://img.shields.io/npm/v/eazyl.svg?style=flat-square)](https://www.npmjs.com/package/eazyl)
[![License](https://img.shields.io/npm/l/eazyl.svg?style=flat-square)](https://www.npmjs.com/package/eazyl)
[![Downloads](https://img.shields.io/npm/dt/eazyl.svg?style=flat-square)](https://www.npmjs.com/package/eazyl)
![Filesize](https://img.shields.io/bundlephobia/min/eazyl.svg)
[![Build Status](https://img.shields.io/travis/teefouad/eazyl/master.svg?style=flat-square)](https://travis-ci.org/teefouad/eazyl) 
![Coveralls GitHub](https://img.shields.io/coveralls/github/teefouad/eazyl.svg)

&nbsp;
&nbsp;

# Installation

**Install with npm**
```
npm install --save eazyl
```

**Install with yarn**
```
yarn add eazyl
```

&nbsp;
&nbsp;

# 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
```

&nbsp;
&nbsp;

# License

MIT

---
_Source: https://npm.io/package/eazyl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
