UNPKG

react-kiwi-dropdown

Version:

| Name | Type | Description | | --------------------------- | -------------------- | ----------- | | options | array | | selectedOption | string | | onCha

13 lines (11 loc) 423 B
import { Observable } from '../Observable'; import { SchedulerLike } from '../types'; import { subscribeToArray } from '../util/subscribeToArray'; import { scheduleArray } from '../scheduled/scheduleArray'; export function fromArray<T>(input: ArrayLike<T>, scheduler?: SchedulerLike) { if (!scheduler) { return new Observable<T>(subscribeToArray(input)); } else { return scheduleArray(input, scheduler); } }