How to use the unnest function from ramda

Find comprehensive JavaScript ramda.unnest code examples handpicked from public code repositorys.

5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
* @since v0.1.0
* @category List
* @sig [a] -> [b]
* @param {Array} list The array to consider.
* @return {Array} The flattened list.
* @see R.unnest
* @example
*
*      R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);
*      //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
fork icon0
star icon0
watch icon0

+ 53 other calls in file

47
48
49
50
51
52
53
54
55
56
return {
  measures: R.fromPairs((query.measures || []).map(annotation('measures')).filter(a => !!a)),
  dimensions: R.fromPairs(dimensions.map(annotation('dimensions')).filter(a => !!a)),
  segments: R.fromPairs((query.segments || []).map(annotation('segments')).filter(a => !!a)),
  timeDimensions: R.fromPairs(
    R.unnest(
      (query.timeDimensions || [])
        .filter(td => !!td.granularity)
        .map(
          td => [annotation('dimensions')(`${td.dimension}.${td.granularity}`)].concat(
fork icon0
star icon0
watch icon0

116
117
118
119
120
121
122
123
124
125
const biggestClimbIngame = Math.max(...biggestClimbsByPlayersInGame);
return biggestClimbIngame;
  }

  getSlides() {
      const slidesDuringTheGame = R.unnest(this.#players.map(player => player.getSlides()));
return slidesDuringTheGame;
  }

  getClimbs() {
fork icon0
star icon0
watch icon0

8
9
10
11
12
13
14
15
16
17
18
19
)


const lines = R.map(parseLine, content)
const maxDimensions = R.compose(
  R.reduce((([x0, y0], [x,y]) => [Math.max(x0, x), Math.max(y0, y)]), [0,-Infinity]),
  R.unnest
)(lines)


const minDimensions = R.compose(
  R.reduce((([x0, y0], [x,y]) => [Math.min(x0, x), Math.min(y0, y)]), [Infinity,0]),
fork icon0
star icon0
watch icon0

+ 5 other calls in file

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)