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

datastore-core

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datastore-core - npm Package Compare versions

Comparing version 0.7.0 to 1.0.0

dist/index.min.js.LICENSE.txt

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="1.0.0"></a>
# [1.0.0](https://github.com/ipfs/js-datastore-core/compare/v0.7.0...v1.0.0) (2020-04-06)
### Bug Fixes
* add buffer and cleanup ([#22](https://github.com/ipfs/js-datastore-core/issues/22)) ([f0f64a9](https://github.com/ipfs/js-datastore-core/commit/f0f64a9))
<a name="0.7.0"></a>

@@ -2,0 +12,0 @@ # [0.7.0](https://github.com/ipfs/js-datastore-core/compare/v0.6.1...v0.7.0) (2019-05-29)

15

package.json
{
"name": "datastore-core",
"version": "0.7.0",
"version": "1.0.0",
"description": "Wrapper implmentation for interface-datastore",

@@ -41,3 +41,3 @@ "leadMaintainer": "Pedro Teixeira <pedro@protocol.ai>",

"devDependencies": {
"aegir": "^19.0.3",
"aegir": "^21.4.5",
"async-iterator-all": "^1.0.0",

@@ -48,4 +48,5 @@ "chai": "^4.2.0",

"dependencies": {
"buffer": "^5.5.0",
"debug": "^4.1.1",
"interface-datastore": "~0.7.0"
"interface-datastore": "^0.8.2"
},

@@ -58,12 +59,12 @@ "engines": {

"David Dias <daviddias.p@gmail.com>",
"achingbrain <alex@achingbrain.net>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Hugo Dias <hugomrdias@gmail.com>",
"Jacob Heun <jacobheun@gmail.com>",
"Zane Starr <zcstarr@zaner.attlocal.net>",
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>",
"Pedro Teixeira <i@pgte.me>",
"Richard Schneider <makaretu@gmail.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
"Victor Bjelkholm <victorbjelkholm@gmail.com>",
"Zane Starr <zcstarr@zaner.attlocal.net>",
"achingbrain <alex@achingbrain.net>"
"Vasco Santos <vasco.santos@moxy.studio>"
]
}

@@ -35,3 +35,3 @@ /* @flow */

_lookup (key) {
for (let mount of this.mounts) {
for (const mount of this.mounts) {
if (mount.prefix.toString() === key.toString() || mount.prefix.isAncestorOf(key)) {

@@ -160,11 +160,5 @@ const s = replaceStartWith(key.toString(), mount.prefix.toString())

return (async function * () {
let completed = iterable.map(() => false)
while (!completed.every(Boolean)) {
for (const [idx, itr] of iterable.entries()) {
const it = await itr.next()
if (it.done) {
completed[idx] = true
continue
}
yield it.value
for (let i = 0; i < iterable.length; i++) {
for await (const v of iterable[i]) {
yield v
}

@@ -171,0 +165,0 @@ }

'use strict'
const { Buffer } = require('buffer')
const Key = require('interface-datastore').Key

@@ -4,0 +5,0 @@

@@ -20,3 +20,3 @@ 'use strict'

try {
await (this.stores.map((store) => store.open()))
await Promise.all(this.stores.map((store) => store.open()))
} catch (err) {

@@ -47,14 +47,10 @@ throw Errors.dbOpenFailedError()

has (key) {
return new Promise(async (resolve) => {
await Promise.all(this.stores.map(async (store) => {
const has = await store.has(key)
async has (key) {
for (const s of this.stores) {
if (await s.has(key)) {
return true
}
}
if (has) {
resolve(true)
}
}))
resolve(false)
})
return false
}

@@ -61,0 +57,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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