npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

ltgt-to-interval

1.0.0

@juliangruber

npmHomeRepoSnykSocket
Downloads:4
$ npm install ltgt-to-interval
DailyWeeklyMonthlyYearly

ltgt-to-interval

Convert a levelup style ltgt object to an interval string.

This is the counterpart to interval-to-ltgt.

Example

var toInterval = require('ltgt-to-interval');

toInterval({});                    // => ','
toInterval({ gt: 'a' });           // => '(a,'
toInterval({ gte: 'a' });          // => '[a,'
toInterval({ lt: 'b' });           // => ',b)'
toInterval({ lte: 'b' });          // => ',b]'
toInterval({ gt: 'a', lte: 'b' }); // => '(a,b]'

Installation

$ npm install ltgt-to-interval

API

toInterval(ltgt)

Render levelup style ltgt object into an interval string.

License

MIT