Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ltgt

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ltgt - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

7

index.js

@@ -20,4 +20,9 @@

// to be compatible with the current abstract-leveldown tests
// nullish or empty strings.
// I could use !!val but I want to permit numbers and booleans,
// if possible.
function isDef (val) {
return 'undefined' !== typeof val
return val != null && val !== ''
}

@@ -24,0 +29,0 @@

2

package.json
{
"name": "ltgt",
"description": "",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/dominictarr/ltgt",

@@ -6,0 +6,0 @@ "repository": {

@@ -83,2 +83,19 @@ var tape = require('tape')

//nullish and empty strings signify are streated like null!
{ range:
{end: null, reverse: true},
selection:
[5, 4, 3, 2, 1]
},
{ range:
{end: undefined, reverse: true},
selection:
[5, 4, 3, 2, 1]
},
{ range:
{end: '', reverse: true},
selection:
[5, 4, 3, 2, 1]
},
//lt/gt/lte/gte

@@ -181,3 +198,3 @@

var strings = ['00', '01']
var strings = ['00', '01', '02']
var sranges = [

@@ -187,4 +204,10 @@ {range:

selection:
['00', '01']
}
['00', '01', '02']
},
{range:
{start: '03', reverse: true},
selection:
['02', '01', '00']
},
]

@@ -221,1 +244,9 @@ function compare (a, b) {

tape('upperBound', function (t) {
t.equal('b', ltgt.upperBound({start: 'b', reverse: true}))
t.equal('b', ltgt.upperBound({end: 'b', reverse: false}))
t.equal(undefined, ltgt.lowerBound({start: 'b', reverse: true}))
t.equal(undefined, ltgt.lowerBound({end: 'b', reverse: false}))
t.end()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc