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

syl.js

v1.2.0

Published

Create and utilize new forms of APIs.

Downloads

18

Readme

Getting Started with Syl

Installing syl.js:

  • Open a new Terminal or Command Prompt.
  • Enter the following command:
npm i syl.js

Notice

As of [email protected], only the WebSyl supports previous versions.

If you are using the PublicSyl (or just Syl) or the PrivateSyl, you will not be able to send data without being on the latest syl.js version. This is due to API incompatibility errors.

You will still be able to receive data from these two tools from this version and above. You will not be able to retrieve data while using any version before @1.1.0.

Changelog

[email protected]

  • Fixed importing issues.

[email protected]

  • Fixed an issue with the WebSyl#setRoute() method for POST requests.

[email protected]

  • Added the PrivateSyl.
    • The PrivateSyl class requires a password to use a Syl. If you'd like a Password, please join the Discord Server shown at the bottom of the page and open a ticket.
  • Modified the Syl to require the usage of methods, rather than setting variables.
    • Syl#setToken(), PrivateSyl#setToken(), and PrivateSyl#setPassword().

[email protected]

  • Updated API Version.

Syl Types

PublicSyl (or just Syl)

  • A basic form of API utility that allows you to communicate between two different scripts.
  • A Web Server is already set up for all Syl instances, and you can access them through tokens.
  • Anyone can modify the data of any token on a PublicSyl. Be careful with this.

PrivateSyl

  • A simple modification to the PublicSyl to require a Syl to have a password.
  • PrivateSyls are given upon request; not given upon immediate access.
    • If you would like access, please join the Discord Server at the bottom of the page and open a ticket.

WebSyl

  • A basic form of Web API that allows you to communicate between web servers.

Examples

PublicSyl

Sending data with PublicSyl

const Syl = require("syl.js");
const syl = new Syl();

syl.setToken("example_token");
syl.send("Hello world!");

Receiving data with PublicSyl

const Syl = require("syl.js");
const syl = new Syl();

syl.setToken("example_token");
syl.read((response) => {
  console.log(response); // expected output: Hello world!
});

PrivateSyl

Note: You must have a Private Syl Instance set up to use this.

Sending data with PrivateSyl

const { PrivateSyl } = require("syl.js");
const syl = new PrivateSyl();

syl.setToken("example_token");
syl.setPassword("hello_world");

syl.send("hello world");

Receiving data with PrivateSyl

const { PrivateSyl } = require("syl.js");
const syl = new PrivateSyl();

syl.setToken("example_token");
syl.setPassword("hello_world");

syl.read((response) => {
    console.log(response); // expected output: hello world
});

WebSyl

Sending data with WebSyl

const { WebSyl, RequestType } = require("syl.js");
const syl = new WebSyl({ port: 80 });

syl.setUpRoute("/", RequestType.GET, { successful: true });
syl.setUpRoute("/data", RequestType.POST, (body, respond) => {
    const { string } = body;
    console.log(string); // expected output: hello world

    respond("Successful!");
    // Syl has an automated response of Successful! that can be overridden.
    // The respond() method is not necessary in your code.
});

Receiving data with WebSyl

const { WebSyl } = require("syl.js");
const syl = new WebSyl({ domain: "https://yourdomain.com" });
// Instead of providing the "port" parameter, you can provide the "domain" parameter to change the type of WebSyl being used.

syl.get("/", (data) => {});
syl.post("/", { string: "hello world" });

Future Plans

  • Introduce the UPDATE Request Type.
  • Introduce the DELETE Request Type.
  • Introduce the DATA CACHE for the Syl and WebSyl.

Dependencies

  • [email protected]
    • Express allows the WebSyl to create a barebones API system.
  • [email protected]
    • atils allows us to send out fancy looking errors, log them in your computer, and allows the RequestTypes Enum to function.

Need Help?

If you need some assistance with syl.js, contact me @ [email protected].I'll assist you when I can.

Little Notice

syl.js will be updating to [email protected] when it releases. I'll have to go through and change a lot of things, but I'd rather use it than not. I still don't have a release date for [email protected] though.

Getting Your Own PrivateSyl

To get a PrivateSyl, join the Discord Server here, and DM the Setrius Development bot to open a support ticket.

Your Discord username and tag will not be shown to our Support Team, nor will you be able to view the Support Team Member's username and tag.