UNPKG

synopsys

Version:

Synopsys is proof of concept datastore service. It stores facts in terms of entity attribute value triples and allows clients to subscribe to _(datomic inspired)_ queries pushing updates to them when new transactions affect results.

25 lines (24 loc) 528 B
export const reverse = Object.assign( /** * @template T * @param {ArrayLike<T>} source * @returns {Iterable<[number, T]>} */ function* reverse(source) { for (let offset = source.length - 1; offset >= 0; offset--) { yield [offset, source[offset]] } }, { /** * @template T * @param {ArrayLike<T>} source * @returns {Iterable<T>} */ *values(source) { for (let offset = source.length - 1; offset >= 0; offset--) { yield source[offset] } }, } )