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

leveldb-registry

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leveldb-registry - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

22

dist/index.js

@@ -100,5 +100,3 @@ "use strict";

.get(id)
.then(function (data) {
return JSON.parse(data);
})["catch"](function () {
.then(JSON.parse)["catch"](function () {
})];

@@ -152,4 +150,20 @@ case 1:

};
return { add: add, remove: remove, fetch: fetch, list: list };
var ids = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2, withLeveldb(function (r) {
return new Promise(function (resolve, reject) {
var keys = [];
r.createKeyStream()
.on('data', function (key) {
keys.push(key.toString());
})
.on('close', function () { return resolve(keys); })
.on('end', function () { return resolve(keys); })
.on('error', function () { return reject(); });
});
})];
});
}); };
return { add: add, remove: remove, fetch: fetch, list: list, ids: ids };
};
exports.leveldbRegistry = leveldbRegistry;

@@ -12,2 +12,3 @@ export interface Identifiable {

list: (filter?: Filter<TItem>) => Promise<TItem[]>;
ids: () => Promise<string[]>;
}

4

package.json
{
"name": "leveldb-registry",
"version": "1.1.1",
"version": "1.2.0",
"description": "leveldb registry",

@@ -12,3 +12,2 @@ "files": [

"build": "tsc",
"build:watch": "tsc --watch",
"test": "jest",

@@ -40,2 +39,3 @@ "test:watch": "jest --watchAll",

"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.59.6",
"eslint": "^8.35.0",

@@ -42,0 +42,0 @@ "eslint-plugin-import": "^2.27.5",

@@ -34,3 +34,6 @@ ## leveldb-registry

const user = await registry.add({ id: randomUUID(), name: "haz" });
return await registry.fetch(user.id);
const found = await registry.fetch(user.id);
const users = await registry.list();
const userIds = await registry.ids();
```
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