UNPKG

luhn-generator

Version:

A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm

15 lines 499 B
import { Observable } from '../Observable'; import { subscribeToIterable } from '../util/subscribeToIterable'; import { scheduleIterable } from '../scheduled/scheduleIterable'; export function fromIterable(input, scheduler) { if (!input) { throw new Error('Iterable cannot be null'); } if (!scheduler) { return new Observable(subscribeToIterable(input)); } else { return scheduleIterable(input, scheduler); } } //# sourceMappingURL=fromIterable.js.map