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

oublie

v0.1.21

Published

Frontend cache with declarative data queries

Downloads

7

Readme

oublie

Forget about state management, just query for your objects instead!

  • Do you like Redux or flux but are tired of your app consisting of 80% boilerplate code and tests for state-magement?
  • Do you like the idea behind GraphQL and Relay but not really ready to completely change the way you write backends and frontends.

oublie is a simple cache where you declaritivly query for your data and pass a load strategy and a cache expiry...

What? Exampels!

Customers with 10 employees or less, optimistic load, 10 seconds expiry:

oublie.sub({many: 'Customer', where: {employees: {lte: 10}}}, 'OP', 10)

Customer with id=5, pessemistic load, 60 seconds expiry:

oublie.sub({one: 'Customer', id: 5}")}, 'PE', 60)
  • What are these queries? They are just simple javascript objects. Oubile uses a superset of popsiql-queries.

  • What strategies are there? 'LO' = local, 'PE' = pessemistic, 'OP' = optimistic, 'VO' = very optimistic

See more examples in the playground Find out more in the docs below.

Docs

Remote

For queries where your remote returns data, it always needs to do so as an object (map) where returned object or objects are nested under

Scratchpad...

{edit: 'Customer', id: 1} {new: 'Customer', data: {name: 'Vandelay Inc.', employees: 5}} {merge: 'Customer', id: 1, data: {name: 'Vandelay Inc.'}} {commit: 'Customer', id: '__1'} {delete: 'Customer', id: 1}

{create: 'Customer', data: {name: 'Vandelay Inc.', employees: 10}} {update: 'Customer', id: 1, data: {name: 'Vandelay Inc.', employees: 5}}

Vill stödja

{many: 'Restaurant', sort: 'name', max: 5} och sen byta till {many: 'Restaurant', sort: 'stars', max: 5}

Nya idéer:

					init			wait			ok tom			ok data			fel					nollställd inför ny

one: nil {}.=w {}.=d {..}.=d {}.=err {}.=w many: nil {}.=w {}.=d {..}.=d {}.=err {}.=w

--- skip this --many sort: undef [].=w [].=d---

init wait done empty error vals