json-fetch-cache

1.2.6 • Public • Published

json-fetch-cache

A simple package for fetching JSON from a URL and caching it for a decided amount of time.

Documentation

Build Status npm version

Installation

$ npm i -S json-fetch-cache

Usage

const Cache = require('json-fetch-cache');
 
const pcCache = new Cache('http://content.warframe.com/dynamic/worldState.php', 10000);
 
pcCache.getData()
  .then((data) => {
    console.log(data);
    process.exit(0);
  })
  .catch((error)=>{
    console.error(error);
  });

Readme

Keywords

Package Sidebar

Install

npm i json-fetch-cache

Weekly Downloads

91

Version

1.2.6

License

Apache-2.0

Unpacked Size

12.6 kB

Total Files

11

Last publish

Collaborators

  • aliasfalse
  • nspacestd