Skip to content

Commit

Permalink
docs for plugins finally
Browse files Browse the repository at this point in the history
  • Loading branch information
brianleroux committed Jul 19, 2011
1 parent 0d9ab16 commit 2a1fe4b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion doc/finding.md
Expand Up @@ -36,5 +36,6 @@ Searching keys is annoying and tedious. GAWD! Oh wait...




Of course you can return everything in a `Lawnchair` with `all`. Or checkout Of course you can return everything in a `Lawnchair` with `all`. Or checkout
the [query plugin](/plugins). the [query plugin](/plugins) for more advanced querying capabilities
should your app require them clientside.


11 changes: 10 additions & 1 deletion doc/iteration.md
Expand Up @@ -4,8 +4,17 @@ iteration
Iterate the `Lawnchair` collection? Don't mind if I do! Iterate the `Lawnchair` collection? Don't mind if I do!




:::JavaScript
Lawnchair(function(){ Lawnchair(function(){
this.each('console.log(record)') this.batch([{type:'beer'}, {type:'coffee'}], function() {
// classic utility...
this.each(function(record, index) {
// ...and a plausable scenario
console.log(record +' at '+ i +' o\'clock ')
// beer at 1 o'clock
// coffee at 2 o'clock
})
})
}) })




Expand Down
4 changes: 2 additions & 2 deletions doc/sugar.md
Expand Up @@ -62,7 +62,7 @@ the `new` keyworld/operator gets some flack. maybe it deservies it but in any ca




:::JavaScript :::JavaScript
var people = new Lawnchair(); var people = new Lawnchair()




or not... you decide. neither is right or wrong and there is no sense in being a or not... you decide. neither is right or wrong and there is no sense in being a
Expand All @@ -78,7 +78,7 @@ probably not surprisingly the `Lawnchair` constructor optionally accepts a callb


:::JavaScript :::JavaScript
// fuck, async makes me HOT // fuck, async makes me HOT
var people = Lawnchair(function() { /* awesome persistence here */}); var people = Lawnchair(function() { /* awesome persistence here */})




it also optionally accepts a config obj for terse callback param injection. it also optionally accepts a config obj for terse callback param injection.
Expand Down

0 comments on commit 2a1fe4b

Please sign in to comment.