![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
@blackglory/structures
Advanced tools
Readme
Common structures.
npm install --save @blackglory/structures
# or
yarn add @blackglory/structures
class Box<T> {
constructor(value: T)
get(): T
set(value: T): void
}
function convertConsToArray<T>([value, next]: Cons<T>): T[]
function convertArrayToCons<T>([value, ...next]: T[]): Cons<T>
type Handler<T> = (vale: T) => void
class Emitter<T> {
get [Symbol.toStringTag](): string
on(event: string, handler: Handler<T>): void
off(event: string, handler: Handler<T>): void
emit(event: string, vale: T): void
}
class HashMap<K, V, H = unknown> {
get [Symbol.toStringTag](): string
get size(): number
constructor(hash: (key: K) => H)
set(key: K, value: V): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
class HashSet<V, H = unknown> implements Iterable<V> {
get [Symbol.toStringTag](): string
get size(): number
[Symbol.iterator](): IterableIterator<V>
constructor(hash: (value: V) => H)
add(value: V): this
delete(value: V): boolean
has(value: V): boolean
clear(): void
values(): Iterable<V>
}
class LRUMap<K, V> {
get [Symbol.toStringTag](): string
get size(): number
constructor(limit: number)
set(key: K, value: V): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
class ExpirableMap<K, V> {
get[Symbol.toStringTag](): string
get size(): number
constructor()
set(key: K, value: V, maxAge: number): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
class TLRUMap<K, V> {
get[Symbol.toStringTag](): string
get size(): number
constructor(limit: number)
set(key: K, value: V, maxAge: number): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
class Queue<T> {
get [Symbol.toStringTag](): string
get size(): number
empty(): void
enqueue(...items: T[]): void
dequeue(): T | undefined
remove(item: T): void
}
class TrieMap<K extends Iterable<T>, V, T = UnpackedIterable<K>> {
get [Symbol.toStringTag](): string
set(key: K, value: V): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
}
type IFiniteStateMachineSchema<State extends string, Event extends string> =
Record<State, Partial<Record<Event, State>>>
class FiniteStateMachine<State extends string, Event extends string> {
get state(): State
constructor(
schema: IFiniteStateMachineSchema<State, Event>
, initialState: State
)
matches(state: State): boolean
can(event: Event): boolean
/**
* @throws {BadEventError}
*/
send(event: Event): void
}
interface IFiniteStateMachineStateChange<
State extends string
, Event extends string
> {
event: Event
oldState: State
newState: State
}
class ObservableFiniteStateMachine<
State extends string
, Event extends string
> extends FiniteStateMachine<State, Event> {
observeStateChanges(): Observable<IFiniteStateMachineStateChange<State, Event>>
}
class InstanceManager<T> {
constructor(
construct: () => Awaitable<T>
, destruct: (instance: T) => Awaitable<void>
)
getInstances(): T[]
getCurrentQuantity(): number
getTargetQuantity(): number
setTargetQuantity(target: number): void
scale(): Promise<void>
}
FAQs
Common structures.
The npm package @blackglory/structures receives a total of 391 weekly downloads. As such, @blackglory/structures popularity was classified as not popular.
We found that @blackglory/structures demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.