Home

Awesome

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