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 🙏

© 2026 – Pkg Stats / Ryan Hefner

entity-network

v0.3.6

Published

This package implements entity network paradigm to work with data

Readme

EntityNetwork.js

EntityNetwork.js is a small framework to work with data. You can use it as a Node.js module and as JS-library in browser. Here you can find its code repository. Feel free to ask me any questions by email [email protected]

Version numbers

This project is in active development stage, so its API could be chang before I release first version. For now every new version that compatible with previous versions increments third number (Z) of version number X.Y.Z. And versions which not compatible with previous version increments second number (Y).

Documentation state

Documentation isn't finished yet, but you can read unit tests sources to figure out how this framework works.

IDE support

In future I'm planning to make plugin for JetBrains products (WebStorm, IDEA, etc.) which will support all framework's features (like values conditions, refactoring, etc.). But I will start to make it after I will realise first version of framework, so if you want to help - please join.

How to install:

To install it in your Node.js project, use this command:

npm install entity-network

You can find all [useful] versions for browser in this folder of repository. Or you can build it by yourself from sources by using this gulp-script:

gulp --gulpfile gulp_web_deploy.js

What is EntityNetwork.js?

This framework allows you to describe semantic data like RDF, but in much more simpler and useful way. It shares two classes:

Entity

Use it to directly create entities and find them:

var cardEntity = Entity.create('card');
var intEntity = Entity.get(CoreId.INT);

EntityLoader

Use this to load entities from JSON file or create entities from any object:

var dataObject = JSON.parse(dataJSON);
EntityLoader.proceedDocumentObject(dataObject);

EntityNetwork.js implements data structure that I called (surprise!) "entity network" which similar to "neural network", because this data structure implements something similar on concept of neuron of grandmother.

In simple words this means the following. Each significant part of data is represented by unique entity, like this:

{
  "my_grandmother": {"is": "entity"}
}

In this example JSON document defines entity with unique identifier "my_grandmother" that inherit root entity with ID "entity". On this diagram this "is" relation is shown by black arrow with triangle.

my_mother-1

Root entity "entity" is using by default, so you can rewrite previous JSON code to create the same grandmother entity:

{
    "my_grandmother": {}
}

When you load this file via EntityLoader, you can find this entity via Entity.get() method:

var grandma = Entity.get('my_grandmother');

Each entity in network connected to other entities via properties and inherit relation. For example:

{
  "my_grandmother": {
    "age": 85,
    "first_name": "Anna"
  },
  
  "age" : {"is": "int"},
  "first_name" : {"is": "string", "min_length": 1}
}

This diagram shows relations and properties between entities: my_mother-2

Relation "is"

In entity network data structure there is an one type of relation and it calls "is". This relation defines ralations between parents and children. Each child inherit all properties and relations from it's parent, like as classes inherit their behaviour from their super classes in OOP paradigm.