New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

abstract-nosql

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-nosql - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

2

package.json
{
"name": "abstract-nosql",
"description": "An abstract prototype for nosql database(LevelDOWN API)",
"version": "1.5.0",
"version": "1.5.1",
"contributors": [

@@ -6,0 +6,0 @@ "Riceball LEE <snowyu.lee@gmail.com> (https://github.com/snowyu)",

@@ -34,3 +34,4 @@ # Abstract NoSQL Database [![Build Status](https://secure.travis-ci.org/snowyu/node-abstract-nosql.png)](http://travis-ci.org/snowyu/node-abstract-nosql)

+ !TODO: Add the stream ability
+ Add the stream ability
* this feature has moved to [nosql-stream](https://snowyu/nosql-stream) package.
+ Add the AbstractError and error code supports.

@@ -106,3 +107,50 @@ * DB constructor allows no location.

# Streamable
see [nosql-stream](https://snowyu/nosql-stream) for more details
```js
var MemDB = require("memdown-sync")
var NoSQLStream = require("nosql-stream")
var ReadStream = NoSQLStream.ReadStream
var WriteStream = NoSQLStream.WriteStream
var db1 = MemDB("db1")
var db2 = MemDB("db2")
var ws = WriteStream(db1)
var ws2 = WriteStream(db2)
ws.on('error', function (err) {
console.log('Oh my!', err)
})
ws.on('finish', function () {
console.log('Write Stream finish')
//read all data through the ReadStream
ReadStream(db1).on('data', function (data) {
console.log(data.key, '=', data.value)
})
.on('error', function (err) {
console.log('Oh my!', err)
})
.on('close', function () {
console.log('Stream closed')
})
.on('end', function () {
console.log('Stream closed')
})
.pipe(ws2) //copy Database db1 to db2:
})
ws.write({ key: 'name', value: 'Yuri Irsenovich Kim' })
ws.write({ key: 'dob', value: '16 February 1941' })
ws.write({ key: 'spouse', value: 'Kim Young-sook' })
ws.write({ key: 'occupation', value: 'Clown' })
ws.end()
```
## Example

@@ -109,0 +157,0 @@

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