ltgt-to-interval

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i ltgt-to-interval

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • juliangruber