How to use the values function from highland

Find comprehensive JavaScript highland.values code examples handpicked from public code repositorys.

highland.values is a function in the Highland.js library that creates a stream from an object's own enumerable property values.

62
63
64
65
66
67
68
69
70
71
  yield this._db.waitForWrites(next.arg(0));
}

// load/ripley state
ripley(db, dispatch, next) {
  const ripley = _.values(this._db.loadState('ripley'));
  console.log('Starting ripley of db : ' + db);
  ripley.toArray((actions) => {
    _(
      traverse(actions).reduce((acc, node) => {
fork icon0
star icon3
watch icon4

How does highland.values work?

highland.values is a method provided by the Highland.js library that creates a new Highland stream with the specified values as its elements. The stream will emit a single data event, which is an array containing all of the values passed as arguments.

Ai Example

1
2
3
4
5
const _ = require("highland");

const stream = _.values(42);

stream.each((num) => console.log(num)); // Output: 42