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

persisted-requests

v1.0.0-prerelease

Published

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![made-with-javascript](https://img.shields.io/badge/Made%20with-JavaScript-1f425f.svg)](https://www.javascript.com

Downloads

1

Readme

Persisted Requests

Maintenance made-with-javascript License: GPL v3

This library allows REST requests to be made from a client without the original context of the request becoming lost in the event the user moves away from the website, or if the page crashes.

This is done by persisting each request in storage before it is sent out. By default, the request then gets removed from storage after it is fulfilled by the server.

Installation Steps

Using NPM: npm install --save persisted-requests

Using Yarn: yarn add persisted-requests

Supported Environments

  • Firefox
  • Chrome
  • Safari

See the browsers section of karma.conf.js for the list of browsers for which tests were ran on.

Supported Persistence Types

  • LocalStorage
  • In-Memory

Supported REST Client

Only Axios is supported for now, future support for other clients will be contingent on the usage of this library.

Unsupported / Untested Request Features

  • Cookies
  • The following Request Body types:
    • XPath
    • XML
    • XML Schema
    • JSON Schema
    • regular expression
    • plain text

Testing

Only end-to-end testing was done for now due to the relative small size of this project. See the tests folder for them.

The tests can be run by calling npm run test. Karma was used with Jasmine to run them in the browser, with Jasmine-Ajax used for capturing the requests sent using an XMLHTTPRequest() spy.

Make sure to set "declaration": false in tsconfig.json before running tests. This is a tech debt to clean up.

Demo

The demo app contains example usage for this library, and also demonstrates what it does under the hood.