1.2.1 • Published 6 months ago

@obi-tec/common-libs v1.2.1

Weekly downloads
-
License
Apache License
Repository
github
Last release
6 months ago

Common Libs

🏁 Content

Install

npm install @obi-tec/common-libs

See all tags clicking here.

Usage

Axios Library

Implementation of axios library to log all sent requests and their respective duration.

const { axios } = require('@obi-tec/common-libs');

const options = {};
await axios.default.get(url, options);

Node-Cache Library

Implementation of node-cache library to create a helper function to get and set.

const { cache } = require('@obi-tec/common-libs');
const key = 'cache-key';
cosnt ttl = 300; // 5 minutes

cache.set(key, 'value', ttl);
cache.get(key);

Status