1.1.2 • Published 2 years ago

tauist v1.1.2

Weekly downloads
37
License
MIT
Repository
github
Last release
2 years ago

Tauist: node time constants

Tauist provides a list of constants for use in cache expiration or TTLs.

Tau is the time constant of any device, such as an RC circuit.

Current Version 1.1.0

Version 1.1.0 adds TypeScript definitions

Platforms / Technologies

Install

  $ npm install tauist --save

There are two objects exposed

var tauist = require('tauist');
// seconds
tauist.s;

// milliseconds
tauist.ms;

Usage

// load into your script
var tauist = require('tauist');

// use in your caching layers

// example: express static
app.use(express.static(__dirname + '/public', { maxAge: tauist.ms.oneDay }));

// example: Node redis (npm install redis)
client.expire('my:key:here', tauist.s.oneHour);

// apply directly to the forehead

Current available times

  • halfMinute
  • oneMinute
  • fiveMinutes
  • tenMinutes
  • thirtyMinutes
  • oneHour
  • twoHours
  • threeHours
  • fourHours
  • fiveHours
  • sixHours
  • oneDay
  • twoDays
  • sevenDays
  • thirtyDays
  • sixMonths
1.1.2

2 years ago

1.1.1

4 years ago

1.0.2

4 years ago

1.1.0

4 years ago

1.0.1

8 years ago

1.0.0

8 years ago