mumu 0.10.0

Lava Mumu is a language for those in the now and that know
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "id": "fn-array-sortBy",
  "dataComponent": "array",
  "heading": {
    "title": "sortBy",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Sorts an array by the result of mapping each item through a function.",
  "codeBlocks": [
    "extend(\"array\")\n\npeople = [ [name:\"Alice\", age:30], [name:\"Bob\", age:25] ]\nsput(array:sortBy(obj => array:prop(\"age\", obj), people))\n// => [ [name:\"Bob\",...], [name:\"Alice\",...] ]"
  ],
  "notes": [
    "Takes (function, array). Function called for each item to extract sort value.",
    "Returns sorted copy. Partial usage supported."
  ]
}