public
Description: Fluent programming (chained method calls) for JavaScript.
Homepage: http://osteele.com/sources/javascript/fluently/
Clone URL: git://github.com/osteele/fluently.git
fluently / agenda.txt
100644 46 lines (37 sloc) 1.049 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
* Next
- accept multiple modifiers
- more test cases: modifiers, aliases; look at every code path
- examples
 
* API
- default modifier table, retrieved via this
- define a set of objects
 
* Release
- create min version
 
* Redesign
** Base object
- create base object
- pass this as 'this' to defined methods
- this has this.options, this.reset
 
** Weaving
- collect all the methods and options
- walk the permutations; each one makes a copy of this and this.options
 
setOptions(visited, options) =
  for (var name in names)
    visited.contains(name) || visit(name, visited, options)
visit(name, visited, options) =
  visited = visited.update(name, true)
  options = update(options, name, true)
 
function FiniteMap() {
  return {
    contains: function(key) {return false},
    update: function(key, value) = {
      return {
        parent: this,
        contains: function(k) {return key == k || this.parent.contains(k)},
        update: this.update
      }
    }
  }
}
 
** Option arguments
- change options to functions; still attach properties