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

@awakenedviskasha/hyperspace

v1.0.7

Published

HyperSpace is a Node library used for creating WEB API quickly and simply. This library will help you creating a distributed method/object like architecture, hopefuly removing Web networking concern from your business logic.

Downloads

2

Readme

HyperSpace

HyperSpace is a Node library used for creating WEB API quickly and simply. This library will help you creating a distributed method/object like architecture, hopefuly removing Web networking concern from your business logic.

Features

  • Create and manage WEB API.
  • Links your differents Node instances through HyperSpace objects.
  • Publish objects to your HyperSpace, they can now be called through the web.
  • Create Impostor object and streamline your API creations and API calls through your HyperSpace network.

Installation

Use the package manager npm to install.

npm install @awakenedviskasha/hyperspace

Usage

  • Instantiate an HyperSpace :
//From NodeProgram1

const {Factory4HyperSpace} = require("@awakenedviskasha/hyperspace");

var pm1 = await Factory4HyperSpace.MakeHyperSpace({
  name: "HyperSpace1",
  path:"HyperSpace1",
  host: "127.0.0.1",
  port: 80,
});
await hs1.launchThis()
//HyperSpace is now operable.
  • Make contact with another HyperSpace :
//From NodeProgram1

await hs1.addAndValidateContactCard({
  name: "HyperSpace2",
  path:"HyperSpace1",
  host: "127.0.0.1",
  port: 88,
}) //Try to reach an Hyperspace using the provided ContactCard
await hs1.sendContactCard(hs1.IDCard); 
//HyperSpace2 has now received a ContactCard from HyperSpace1.
  • Publish a class object to make it available anywhere :
//From NodeProgram2

class HyperSpatialObject {
  constructor() {
    this.a = "a";
    this.b = "b";
    this.c = 0;
  }
  incrementC(int, int1) {
    this.c = this.c + int + int1;
  }
  concatAll() {
    return this.a + this.b + this.c;
  }
}

var hsObject = new HyperSpatialObject();
var publisher = new Publisher4HyperSpace(hs2, hsObject);
var impostorUrl = await publisher.publish4Impostor("myCuteImpostor");
//Data for creating an Impostor object of hsObject is now available on the HyperSpace network.
  • Create and interact with an Impostor object from another HyperSpace :
//From NodeProgram1

var impostor = await ImpostorMaker4HyperSpace(hs1, cc2, "myCuteImpostor");
// Impostor will act as a proxy for hsObject from NodeProgram2

await impostor.incrementC(3, 6);
console.log(await impostor.concatAll()); //outputs "ab9".

Limitations

  • Not tested with inherited class.
  • You have to implement yourself orchestration for published objects or Hyperspace ContactCards.
  • No security layer for now...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Request for functionnality is open.

Feedbacks are welcome since it is my first public package.

Contact

Do you have questions, suggestions or a business opportunity to offer ? You can contact me here : [email protected]

Do you want to chat or join a community ? Come on our discord channel : https://discord.gg/Dd4dHsVswu

Donations

Donations are welcome. If the library helped you or you need an extra functionality, don't hesitate to buy me a coffee !

https://www.buymeacoffee.com/awakenedviskash

License

MIT

CHANGELOG

v1.0.7

  • [F2] Contact Card Direct Request implemented. YOu can nom use ContactCard from impostor for making a request through the HyperSpace.
  • Added a new method for creating Impostor that will return a ContactCard.
  • Removed a console.log during a request.
  • Deprecation warning : ImpostorMaker4HyperSpace.makeImpostor and Publisher4HyperSpace.publish4Impostor will be deprecated.