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

abstract-leveldown

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-leveldown - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

4

abstract-leveldown.js

@@ -11,4 +11,4 @@ /* Copyright (c) 2013 Rod Vagg, MIT License */

if (typeof location != 'string' || !location.length)
throw new Error('constructor requires a non empty location string')
if (typeof location != 'string')
throw new Error('constructor requires a location string argument')

@@ -15,0 +15,0 @@ this.location = location

@@ -5,3 +5,3 @@ module.exports.args = function (leveldown, test) {

leveldown
, /constructor requires at least a location argument/
, { name: 'Error', message: 'constructor requires at least a location argument' }
, 'no-arg leveldown() throws'

@@ -11,3 +11,2 @@ )

})
test('test database creation non-string location throws', function (t) {

@@ -18,3 +17,3 @@ t.throws(

}
, /constructor requires a non empty location string/
, { name: 'Error', message: 'constructor requires a location string argument' }
, 'non-string location leveldown() throws'

@@ -25,16 +24,4 @@ )

test('test database creation empty string location throws', function (t) {
t.throws(
function () {
leveldown('')
}
, /constructor requires a non empty location string/
, 'non-string location leveldown() throws'
)
t.end()
})
test('test database creation non empty string does not throw', function (t) {
var db
t.doesNotThrow(function () { db = leveldown('foo') })
test('test database open no-arg throws', function (t) {
var db = leveldown('foo')
t.ok(db, 'database object returned')

@@ -44,2 +31,2 @@ t.ok(typeof db.open === 'function', 'open() function exists')

})
}
}
{
"name": "abstract-leveldown",
"description": "An abstract prototype matching the LevelDOWN API",
"version": "2.2.1",
"version": "2.2.2",
"contributors": [

@@ -6,0 +6,0 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)",

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