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

entity-space

v0.6.8

Published

Client-side data caching library providing simple querying

Downloads

24

Readme

entity-space

entity-space is an attempt to create an abstraction layer between business and API logic, simplyfing CRUD operations and providing a cache to reduce the number of HTTP requests made to consumed APIs.

documentation

proper API documentation will follow as soon as version reaches stable v1.0.0

features / goals

  • unify data loading/saving logic
  • cache data fetched from APIs
  • abstract multiple APIs into a single interface

requirements

  • describe properties and relations of domain entities
  • implement classes to handle CRUD HTTP requests
  • use the in-built query system to execute CRUD operations

goals

0.6.0

filter criteria

ability to specify a query filter describing valid value ranges an entity should have (root level only, not navigations).

requires:

  • proper reduction (as far as it makes sense) of 2 filters
  • proper reduction of 2 queries with one or both of them having filters
  • filtering arrays of entities

nice to have:

  • helper to format filter into valid OData format

0.7.0+

result, payload

intermediate object to improve loading/saving capabilities @ service-cluster.

  • helps dealing with partial success / errors
  • possibly a "live" result object that populates it with entities as they are loaded

OData utils

required feature to make entity-space user-friendly.

  • generate entity classes from metadata
    • ideally puts properties & decorators "in-place", so that users can keep their custom getters/setters etc.
    • a small app would be fantastic, since there might be a ton of options
  • OData entity-service implementations
    • should be rich in features but thin in abstraction, so users are not forced to write workarounds
    • provides common loading/saving logic
    • query/filter/expansion toString() implementations

debug utils

give users a way to see what is happening during the execution of a query.

cache invalidation

more granularity in removing entities from the cache (instead of just by entity class).

contexts

contexts are attached to a query and represent a filter on the entities & navigations that can only be evaluated @ server.

the use case this feature stems from is an entity (which has a child collection of its own type, i.e. a tree) that can be filtered by a boolan & date range value which we have no knowledge of or access to @ client.

entity validation

would be nice to be able to validate an entity before trying to save it.

query statistics

just because it would be interesting, but it also might help identify issues in the code.

indexedDB support

wouldn't it be awesome to be able to replace the object-caches with an indexedDB?

the way i see it it can be done already, without having to shove around existing code too much.

abstract entities

ability to transform/map entities into an abstraction of them.

top & skip

ability to do offset load results - was high priority, but not soo much anymore due to filter critera.

entity base class

controversial, since it would require users to extend from it, but it would help a lot with fetching the metadata of an entity class.

  • static $ prop @ child class for useful stuff, like $.metadata
  • child class instance must implement $ getter for access via instance

query merging

as of now, queries just reduce each other, but none are ever merged. would increase performance since less query reductions would be made (especially if filters are used in order to page results).

domains

the support to have multiple entity-space instances at a time

aggregate keys

aggregate keys for references that are not virtual (=> [indexes] identity)