npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lonadb-client

v4.5.3

Published

JavaScript client for LonaDB

Downloads

32

Readme

Installation

You can install the JavaScript-Client library using npm:

npm install lonadb-client

Usage

To use the LonaDB Client library, follow these steps:

  1. Import the required modules and classes:
const LonaClient = require("lonadb-client");
  1. Create an instance of the LonaDB-Client class:
const client = new LonaClient(host, port, name, password);

Replace host, port, name, and password with the appropriate values for your LonaDB Server.

  1. Use the provided methods to interact with the server:
// Example: Get a list of tables
client.getTables()
    .then(tables => {
        console.log("List of tables:");
        console.log(tables);
    })
    .catch(error => {
        console.error("Error:", error);
    });

Available Methods

getTables(username)

Retrieves a list of tables available in the database.

getTableData(table)

Retrieves data from a specified table.

deleteTable(name)

Deletes a table by its name.

createTable(name)

Creates a new table with the given name.

set(table, name, value)

Sets a variable within a table to the specified value.

delete(table, name)

Deletes a variable from a table.

get(table, name)

Retrieves the value of a variable from a table.

getUsers()

Retrieves a list of users in the database.

createUser(name, password)

Creates a new user with the given name and password.

deleteUser(name)

Deletes a user by their name.

checkPassword(name, password)

Checks if the provided password is correct for a given user.

checkPermission(user, permission)

Checks if a user has a specific permission.

removePermission(user, permission)

Removes a permission from a user.

getPermissionsRaw(name)

Retrieves the raw permission data for a user.

addPermission(user, permission)

Adds a permission to a user.

createFunction(name, content)

Create a function which can be executed whenever you want. Just like eval. Content = string of PHP code

executeFunction(name)

Executes the function

eval(function)

Runs the function (must be a string of PHP code) Example: "if($abc === 1234) return 'wtf';" Response: {"success": true, "response": "wtf", "process": processID}

License

This project is licensed under the GNU Affero General Public License version 3 (GNU AGPL-3.0)