JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 74
  • Score
    100M100P100Q57214F
  • License

A Node.JS multi-layered class builder with built-in parent systems as well as better function and property makers

Package Exports

  • aepl
  • aepl/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aepl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aepl

version downloads docs publish

aepl is a Node.JS multi-layered class builder with built-in parent systems as well as better function and property makers for easier development and modding support inspired by Roblox's parent system

  • Open source
  • Lightweight
  • Easy to use
  • Compact



npm i aepl
npm i paigeroid/aepl



Basic Use

const { Class } = require('aepl');


// creates a new class named Lobby
new Class("Lobby", class {
    constructor() {
    this.players = [];
        this.id = "id here";
    }
});


// creates a new class for lobbies named Player
new Lobby.Class("Player", class {
    constructor(data) {
        this.parent.players.push(data);
    }
});


// creates a new property for players named lobbyId
new Player.Property("lobbyId", function() {
    return this.parent.id;
});


// creates a new lobby
let lobby = new Lobby();


// creates new players
let player = new lobby.Player("a");
new lobby.Player("b");


console.log(player.lobbyId); // "id here"
console.log(lobby.players); // ["a", "b"]



Classes

  • Function: creates a new function for the class
  • AsyncFunction: creates a new async function for the class
  • Property: creates a new property for the class
  • Chore: creates a new chore for the class
  • AsyncChore: creates a new async chore for the class
  • Class: creates a new class inside of the class