# Class Repo

#### Hierarchy

- default<CID>
  - Repo

- Defined in repositories/cid-log.ts:19

#####
Index

### Constructors

constructor

### Properties

dictionary
memoryCache
storage
storageName

### Methods

add
clear
find
fromJSON
getAll
getByIndex
getByKey
indexOf
length
newest
toDictionary
toJSON
create

## Constructors

### `Private` constructor

- new Repo(options: RepositoryOptions): Repo

- #### Parameters

  - ##### options: RepositoryOptions

  #### Returns Repo

  Overrides default.constructor

  - Defined in repositories/cid-log.ts:21

## Properties

### dictionary

dictionary: Record<string, CID<unknown, number, number, Version>>

Inherited from default.dictionary

- Defined in repository.ts:13

### memoryCache

memoryCache: CID<unknown, number, number, Version>[]

Inherited from default.memoryCache

- Defined in repository.ts:14

### storage

storage: Storage.Implementation

Inherited from default.storage

- Defined in repository.ts:15

### storageName

storageName: string

Inherited from default.storageName

- Defined in repository.ts:16

## Methods

### add

- add(itemOrItems: CID<unknown, number, number, Version> | CID<unknown, number, number, Version>[]): Promise<void>

- #### Parameters

  - ##### itemOrItems: CID<unknown, number, number, Version> | CID<unknown, number, number, Version>[]

  #### Returns Promise<void>

  Inherited from default.add

  - Defined in repository.ts:36

### clear

- clear(): Promise<void>

- #### Returns Promise<void>

  Inherited from default.clear

  - Defined in repository.ts:49

### find

- find(predicate: ((value: CID<unknown, number, number, Version>, index: number) => boolean)): null | CID<unknown, number, number, Version>

- #### Parameters

  - ##### predicate: ((value: CID<unknown, number, number, Version>, index: number) => boolean)

    - - (value: CID<unknown, number, number, Version>, index: number): boolean

      - #### Parameters

        - ##### value: CID<unknown, number, number, Version>

        - ##### index: number

        #### Returns boolean

  #### Returns null | CID<unknown, number, number, Version>

  Inherited from default.find

  - Defined in repository.ts:56

### fromJSON

- fromJSON(a: string): CID<unknown, number, number, Version>

- #### Parameters

  - ##### a: string

  #### Returns CID<unknown, number, number, Version>

  Overrides default.fromJSON

  - Defined in repositories/cid-log.ts:25

### getAll

- getAll(): Promise<CID<unknown, number, number, Version>[]>

- #### Returns Promise<CID<unknown, number, number, Version>[]>

  Inherited from default.getAll

  - Defined in repository.ts:64

### getByIndex

- getByIndex(idx: number): null | CID<unknown, number, number, Version>

- #### Parameters

  - ##### idx: number

  #### Returns null | CID<unknown, number, number, Version>

  Inherited from default.getByIndex

  - Defined in repository.ts:60

### getByKey

- getByKey(key: string): null | CID<unknown, number, number, Version>

- #### Parameters

  - ##### key: string

  #### Returns null | CID<unknown, number, number, Version>

  Inherited from default.getByKey

  - Defined in repository.ts:96

### indexOf

- indexOf(item: CID<unknown, number, number, Version>): number

- #### Parameters

  - ##### item: CID<unknown, number, number, Version>

  #### Returns number

  Inherited from default.indexOf

  - Defined in repository.ts:74

### length

- length(): number

- #### Returns number

  Inherited from default.length

  - Defined in repository.ts:78

### newest

- newest(): CID<unknown, number, number, Version>

- #### Returns CID<unknown, number, number, Version>

  - Defined in repositories/cid-log.ts:33

### toDictionary

- toDictionary(items: CID<unknown, number, number, Version>[]): Record<string, CID<unknown, number, number, Version>>

- #### Parameters

  - ##### items: CID<unknown, number, number, Version>[]

  #### Returns Record<string, CID<unknown, number, number, Version>>

  Inherited from default.toDictionary

  - Defined in repository.ts:100

### toJSON

- toJSON(a: CID<unknown, number, number, Version>): string

- #### Parameters

  - ##### a: CID<unknown, number, number, Version>

  #### Returns string

  Overrides default.toJSON

  - Defined in repositories/cid-log.ts:29

### `Static` create

- create<T>(options: RepositoryOptions): Promise<any>

- #### Type Parameters

  - #### T

  #### Parameters

  - ##### options: RepositoryOptions

  #### Returns Promise<any>

  Inherited from default.create

  - Defined in repository.ts:26

Generated using TypeDoc