Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barbarbar338/perman.js
π Permission management made easy
https://github.com/barbarbar338/perman.js
bin binary bit bits bitwise flag flags perm permission permissions
Last synced: 6 days ago
JSON representation
π Permission management made easy
- Host: GitHub
- URL: https://github.com/barbarbar338/perman.js
- Owner: barbarbar338
- License: gpl-3.0
- Created: 2022-06-15T14:31:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T14:45:13.000Z (about 1 month ago)
- Last Synced: 2024-10-24T15:10:24.522Z (22 days ago)
- Topics: bin, binary, bit, bits, bitwise, flag, flags, perm, permission, permissions
- Language: TypeScript
- Homepage: https://npmjs.com/perman
- Size: 35.2 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![stars](https://img.shields.io/github/stars/barbarbar338/perman.js?color=yellow&logo=github&style=for-the-badge)](https://github.com/barbarbar338/perman)
[![license](https://img.shields.io/github/license/barbarbar338/perman.js?logo=github&style=for-the-badge)](https://github.com/barbarbar338/perman.js)
[![supportServer](https://img.shields.io/discord/711995199945179187?color=7289DA&label=Support&logo=discord&style=for-the-badge)](https://discord.gg/BjEJFwh)
[![forks](https://img.shields.io/github/forks/barbarbar338/perman.js?color=green&logo=github&style=for-the-badge)](https://github.com/barbarbar338/perman.js)
[![issues](https://img.shields.io/github/issues/barbarbar338/perman.js?color=red&logo=github&style=for-the-badge)](https://github.com/barbarbar338/perman.js)
Perman.JS
π Permission management made easy
Get support Β»
Report Bug
Β·
Request Feature
Β·
Webpage
# π Perman
Permission management made easy
# π¦ Installation
- Using yarn: `yarn add perman`
- Using npm: `npm i perman`# π€ Usage
```js
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;
```# π License
Copyright Β© 2022 [BarΔ±Ε DEMΔ°RCΔ°](https://github.com/barbarbar338).
Distributed under the [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0.html) License. See `LICENSE` for more information.
# 𧦠Contributing
Fell free to use GitHub's features.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/my-feature`)
3. Run prettier (`npm run format`)
4. Commit your Changes (`git commit -m 'my awesome feature my-feature'`)
5. Push to the Branch (`git push origin feature/my-feature`)
6. Open a Pull Request# π₯ Show your support
Give a βοΈ if this project helped you!
# π Contact
- Mail: [email protected]
- Discord: https://discord.gg/BjEJFwh
- Webpage: https://338.rocks