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

@adorsys/encrypt-down

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adorsys/encrypt-down - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

.airtap.yml

64

package.json
{
"name": "@adorsys/encrypt-down",
"version": "2.0.1",
"version": "2.1.0",
"description": "Encryption layer for level-db",

@@ -37,4 +37,6 @@ "main": "src/index.js",

"test": "nyc --reporter=lcov --reporter=text ava",
"test:integ-browser": "airtap --local test/integrations/leveljs.test.js",
"test:integ": "tape test/integrations/leveldown.test.js test/integrations/memdown.test.js | tap-spec",
"test:integ-browser": "airtap --loopback airtap.local test/integrations/leveljs.test.js",
"test:integ-browser-local": "airtap --coverage --local --port 9000 test/integrations/leveljs.test.js",
"test:integ-node": "tape test/integrations/leveldown.test.js test/integrations/memdown.test.js | tap-spec",
"test:ci": "npm run test && npm run test:integ-node && npm run test:integ-browser",
"coverage": "nyc report --reporter=text-lcov | coveralls",

@@ -64,33 +66,33 @@ "build": "browserify -s encryptdown -e src/index.js -o dist/lib.js",

"dependencies": {
"@adorsys/jwe-codec": "1.0.0",
"abstract-leveldown": "6.0.0",
"inherits": "2.0.3",
"node-jose": "1.0.0"
"@adorsys/jwe-codec": "^1.0.1",
"abstract-leveldown": "^6.2.2",
"inherits": "^2.0.4",
"node-jose": "^1.1.3"
},
"devDependencies": {
"@commitlint/cli": "7.1.2",
"@commitlint/config-conventional": "7.1.2",
"airtap": "0.1.0",
"ava": "1.0.0-beta.8",
"browserify": "16.2.3",
"coveralls": "3.0.2",
"cuid": "2.1.4",
"eslint-plugin-html": "4.0.5",
"eslint-plugin-markdown": "1.0.0-beta.6",
"husky": "1.0.0-rc.15",
"level-concat-iterator": "2.0.0",
"level-js": "3.0.0",
"leveldown": "4.0.1",
"lint-staged": "7.3.0",
"memdown": "3.0.0",
"nyc": "13.0.1",
"prettier-standard": "8.0.1",
"semantic-release": "^15.9.17",
"snazzy": "8.0.0",
"standard": "12.0.1",
"tap-spec": "5.0.0",
"tape": "4.9.1",
"tempy": "0.2.1",
"travis-deploy-once": "^5.0.9"
"@commitlint/cli": "^8.3.4",
"@commitlint/config-conventional": "^8.3.4",
"airtap": "^2.0.4",
"ava": "^2.4.0",
"browserify": "^16.5.0",
"coveralls": "^3.0.9",
"cuid": "^2.1.8",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-markdown": "^1.0.1",
"husky": "^4.0.1",
"level-concat-iterator": "^2.0.1",
"level-js": "^4.0.2",
"leveldown": "^5.4.1",
"lint-staged": "^9.5.0",
"memdown": "^4.1.0",
"nyc": "^15.0.0",
"prettier-standard": "^16.1.0",
"semantic-release": "^15.14.0",
"snazzy": "^8.0.0",
"standard": "^14.3.1",
"tap-spec": "^5.0.0",
"tape": "^4.13.0",
"tempy": "^0.3.0",
"travis-deploy-once": "^5.0.11"
}
}
# :closed_lock_with_key: encrypt-down :closed_lock_with_key:
[![leveldb](http://leveldb.org/img/badge.svg)](https://github.com/level/awesome)
[![leveldb](https://leveljs.org/img/badge.svg)](https://github.com/level/awesome)
[![Travis](https://img.shields.io/travis/adorsys/encrypt-down.svg)](https://travis-ci.org/adorsys/encrypt-down)

@@ -32,3 +32,3 @@ [![Coveralls](https://img.shields.io/coveralls/adorsys/encrypt-down.svg)](https://coveralls.io/github/adorsys/encrypt-down)

const memdown = require('memdown')
const encryptdown = require('./src')
const encryptdown = require('@adorsys/encrypt-down')
const levelup = require('levelup')

@@ -56,2 +56,6 @@ const jwk = {

### Browser Support
[![Sauce Test Status](https://saucelabs.com/browser-matrix/radzom.svg)](https://saucelabs.com/u/radzom)
## API

@@ -71,3 +75,3 @@

<!-- prettier-ignore -->
| <img src="https://avatars.githubusercontent.com/u/3055345?v=3" width="100px;"/><br /><sub><b>Vincent Weevers</b></sub><br />:speech_balloon: | <img src="https://avatars.githubusercontent.com/u/1225651?v=3" width="100px;"/><br /><sub><b>Francis Pouatcha</b></sub><br />🤔 | | | | | |
| <img src="https://avatars.githubusercontent.com/u/3055345" width="100px;"/><br /><sub><b>Vincent Weevers</b></sub><br />💬 | <img src="https://avatars.githubusercontent.com/u/1225651" width="100px;"/><br /><sub><b>Francis Pouatcha</b></sub><br />🤔 | <img src="https://avatars2.githubusercontent.com/u/25199775" width="100px;"/><br /><sub><b>Boris Skert</b></sub><br />📖 | | | | |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |

@@ -74,0 +78,0 @@ <!-- ALL-CONTRIBUTORS-LIST:END -->

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

DB.prototype._get = function (key, options, callback) {
this.db.get(key, { ...options, asBuffer: false }, (err, cipher) => {
this.db.get(key, Object.assign({}, options, { asBuffer: false }), (err, cipher) => {
if (err) {

@@ -74,6 +74,3 @@ return callback(err)

const checkedValue = emptyStringWhenNull(value)
callback(
null,
options.asBuffer ? Buffer.from(String(checkedValue)) : checkedValue
)
callback(null, options.asBuffer ? Buffer.from(String(checkedValue)) : checkedValue)
})

@@ -113,3 +110,3 @@ .catch(callback)

this.options = options
this.it = db.db.iterator({ ...this.options, valueAsBuffer: false })
this.it = db.db.iterator(Object.assign({}, this.options, { valueAsBuffer: false }))
}

@@ -130,7 +127,3 @@

.then(value => {
callback(
null,
key,
this.options.valueAsBuffer ? Buffer.from(String(value)) : value
)
callback(null, key, this.options.valueAsBuffer ? Buffer.from(String(value)) : value)
})

@@ -151,4 +144,4 @@ .catch(callback)

return codec.encrypt(operation.value).then(function (cipher) {
return { ...operation, value: cipher }
return Object.assign({}, operation, { value: cipher })
})
}

@@ -50,2 +50,4 @@ const test = require('ava')

await promisedDB.put('e', 'E')
await promisedDB.put('ß', 'ß')
await promisedDB.put('😀', '🎉')
await promisedDB.batch([

@@ -62,3 +64,3 @@ { type: 'put', key: 'd', value: 'D' },

t.falsy(err, 'no error')
t.is(data.length, 5, 'correct number of entries')
t.is(data.length, 7, 'correct number of entries')
const expected = [

@@ -69,3 +71,5 @@ { key: 'a', value: 'A' },

{ key: 'f', value: 'F' },
{ key: 'g', value: 'G' }
{ key: 'g', value: 'G' },
{ key: 'ß', value: 'ß' },
{ key: '😀', value: '🎉' }
]

@@ -72,0 +76,0 @@ t.deepEqual(data, expected)

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

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