(options?: {
readonly baseWeight?: number | undefined
})
| 90 | * @since 3.19.0 |
| 91 | */ |
| 92 | export const make = <A extends PrimaryKey.PrimaryKey>(options?: { |
| 93 | readonly baseWeight?: number | undefined |
| 94 | }): HashRing<A> => { |
| 95 | const self = Object.create(Proto) |
| 96 | self.baseWeight = Math.max(options?.baseWeight ?? 128, 1) |
| 97 | self.totalWeightCache = 0 |
| 98 | self.nodes = new Map() |
| 99 | self.ring = [] |
| 100 | return self |
| 101 | } |
| 102 | |
| 103 | const Proto = { |
| 104 | ...PipeInspectableProto, |
nothing calls this directly
no outgoing calls
no test coverage detected