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.7.0 to 2.7.1

168

index.d.ts

@@ -1,97 +0,85 @@

declare namespace Abstract {
interface LevelDOWN<
TKey=any,
TValue=any,
TOptions=any,
TPutOptions=any,
TGetOptions=any,
TDeleteOptions=any,
TIteratorOptions=any,
TBatchOptions=any> {
open(callback: any): void;
open(options: TOptions, callback: any): void;
close(callback: any): void;
get(key: TKey, callback: any): void;
get(key: TKey, options: TGetOptions, callback: any): void;
put(key: TKey, value: TValue, callback: any): void;
put(key: TKey, value: TValue, options: TPutOptions, callback: any): void;
del(key: TKey, callback: any): void;
del(key: TKey, options: TDeleteOptions, callback: any): void;
batch(): ChainedBatch<TKey, TValue>
batch(array: any[], callback: any): any;
batch(array: any[], options: TBatchOptions, callback: any): any;
iterator(options?: TIteratorOptions): Iterator
[index: string]: any;
}
interface AbstractLevelDOWN<K=any, V=any, O=any, PO=any, GO=any, DO=any, IO=any, BO=any> {
open(callback: (err?: any) => void);
open(options: O, callback: (err?: any) => void);
interface LevelDOWNConstructor {
new
<
TKey=any,
TValue=any,
TOptions=any,
TPutOptions=any,
TGetOptions=any,
TDeleteOptions=any,
TIteratorOptions=any,
TBatchOptions=any
>(location: string): LevelDOWN<
TKey,
TValue,
TOptions,
TPutOptions,
TGetOptions,
TDeleteOptions,
TIteratorOptions,
TBatchOptions>;
<
TKey=any,
TValue=any,
TOptions=any,
TPutOptions=any,
TGetOptions=any,
TDeleteOptions=any,
TIteratorOptions=any,
TBatchOptions=any
>(location: string): LevelDOWN<
TKey,
TValue,
TOptions,
TPutOptions,
TGetOptions,
TDeleteOptions,
TIteratorOptions,
TBatchOptions>
}
close(callback: (err?: any) => void);
interface Iterator {
next(callback: any): void;
end(callback: any): void;
[index: string]: any;
}
interface IteratorConstructor {
new(db: any): Iterator;
(db: any): Iterator;
}
get(key: K, callback: (err, value: V) => any);
get(key: K, options: GO, callback: (err, value: V) => any);
interface ChainedBatch<TKey=any, TValue=any> {
put(key: TKey, value: TValue): this;
del(key: TKey): this;
clear(): this;
write(callback: any): any
write(options: any, callback: any): any
[index: string]: any;
}
put(key: K, value: V, callback: (err: any) => any);
put(key: K, value: V, options: PO, callback: (err: any) => any);
interface ChainedBatchConstructor {
new <TKey, TValue>(db: any): ChainedBatch<TKey, TValue>;
<TKey, TValue>(db: any): ChainedBatch<TKey, TValue>;
}
del(key: K, callback: (err: any) => any);
del(key: K, options: DO, callback: (err: any) => any);
export const AbstractIterator: IteratorConstructor & Iterator;
export const AbstractLevelDOWN: LevelDOWNConstructor & LevelDOWN;
export const AbstractChainedBatch: ChainedBatchConstructor & ChainedBatch;
export function isLevelDOWN(db: any): boolean;
batch(): AbstractChainedBatch<K, V, BO>;
batch(array: Batch<K, V>[], callback: (err: any) => any);
batch(array: Batch<K, V>[], options: BO, callback: (err: any) => any);
iterator(options?: IO & AbstractIteratorOptions<K>): AbstractIterator<K, V>;
approximateSize(start: K, end: K, cb: (err: any, size: number) => void): void;
[index: string]: any;
}
export = Abstract;
interface AbstractLevelDOWNConstructor {
new <K=any, V=any, O=any, PO=any, GO=any, DO=any, IO=any, BO=any>(location: string): AbstractLevelDOWN<
K, V, O, PO, GO, DO, IO, BO>;
<K=any, V=any, O=any, PO=any, GO=any, DO=any, IO=any, BO=any>(location: string): AbstractLevelDOWN<
K, V, O, PO, GO, DO, IO, BO>;
}
export interface AbstractIteratorOptions<K=any> {
gt?: K;
gte?: K;
lt?: K;
lte?: K;
reverse?: boolean;
limit?: number;
keys?: boolean;
values?: boolean;
}
export type Batch<K=any, V=any> = PutBatch<K, V> | DelBatch<K>
export interface PutBatch<K=any, V=any> {
type: 'put',
key: K,
value: V
}
export interface DelBatch<K=any, V=any> {
type: 'del',
key: K
}
interface AbstractIterator<K=any, V=any> {
next(callback: (err: any, key: K, value: V) => void): void;
end(callback: (err: any) => void): void;
}
interface AbstractIteratorConstructor {
new <K=any, V=any>(db: any): AbstractIterator<K, V>;
<K=any, V=any>(db: any): AbstractIterator<K, V>;
}
interface AbstractChainedBatch<K=any, V=any, BO=any> extends AbstractChainedBatchConstructor {
put(key: K, value: V): this;
del(key: K): this;
clear(): this;
write(callback: any): any
write(options: BO, callback: any): any
[index: string]: any;
}
interface AbstractChainedBatchConstructor {
new <K, V, BO>(db: any): AbstractChainedBatch<K, V, BO>;
<K, V, BO>(db: any): AbstractChainedBatch<K, V, BO>;
}
export const AbstractLevelDOWN: AbstractLevelDOWNConstructor
export const AbstractIterator: AbstractIteratorConstructor
export const AbstractChainedBatch: AbstractChainedBatchConstructor
export function isLevelDOWN(db: any): boolean;
{
"name": "abstract-leveldown",
"description": "An abstract prototype matching the LevelDOWN API",
"version": "2.7.0",
"version": "2.7.1",
"contributors": [

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

"rimraf": "^2.6.1",
"sinon": "^3.2.0",
"sinon": "^4.0.0",
"tape": "^4.7.0"

@@ -41,0 +41,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