🔑 Permission management made easy
Get support »
Report Bug
·
Request Feature
·
Webpage
Permission management made easy
- Using yarn:
yarn add perman
- Using npm:
npm i perman
import { Perman } from "perman";
const perman = Perman.from(["user", "verified", "admin"]);
const user = perman.serialize(["user"]);
const verified = perman.serialize(["user", "verified"]);
const admin = perman.serialize(["user", "admin"]);
user.has("user"); // true
user.has("admin"); // false;
verified.has("verified"); // true;
verified.has("admin"); // false;
admin.has("admin"); // true;
// add permissions
user.has("verified"); // false;
user = user.add("verified");
user.has("verified"); // true;
// remove permissions
verified.has("verified"); // true;
verified = verified.remove("verified");
verified.has("verified"); // false;
Copyright © 2022 Barış DEMİRCİ.
Distributed under the GPL-3.0 License. See LICENSE
for more information.
Fell free to use GitHub's features.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/my-feature
) - Run prettier (
npm run format
) - Commit your Changes (
git commit -m 'my awesome feature my-feature'
) - Push to the Branch (
git push origin feature/my-feature
) - Open a Pull Request
Give a ⭐️ if this project helped you!
- Mail: demirci.baris38@gmail.com
- Discord: https://discord.gg/BjEJFwh
- Webpage: https://338.rocks