UNPKG

kefir

Version:

Reactive Programming library for JavaScript inspired by Bacon.js and RxJS with focus on high performance and low memory usage

25 lines (20 loc) 559 B
import {inherit} from '../utils/objects' import Property from '../property' // HACK: // We don't call parent Class constructor, but instead putting all necessary // properties into prototype to simulate ended Property // (see Propperty and Observable classes). function P(value) { this._currentEvent = {type: 'value', value, current: true} } inherit(P, Property, { _name: 'constant', _active: false, _activating: false, _alive: false, _dispatcher: null, _logHandlers: null, }) export default function constant(x) { return new P(x) }