Add lodash, rack-test

This commit is contained in:
Rico Sta. Cruz 2015-10-15 18:56:20 +08:00
parent 8a3ba8d402
commit b40e7629b1
2 changed files with 50 additions and 0 deletions

31
lodash.md Normal file
View File

@ -0,0 +1,31 @@
---
title: Lodash
---
> This is an incomplete list.
### Array
```js
_.chunk([ abcd ], 2) //=> [ [ab], [cd] ]
_.compact(list)
_.difference([ abc ], [ bc ]) //=> [ a ]
_.intersection()
_.drop([ abcde ], 1) //=> [ bcde ] (right)
_.dropWhile
_.dropRight
_.dropRightWhile
_.fill(Array(4), 'x') //=> [ 'x', 'x', 'x', 'x' ]
_.findIndex
_.findLastIndex
_.flatten
_.flattenDeep
_.indexOf(list, val)
```

19
rack-test.md Normal file
View File

@ -0,0 +1,19 @@
---
title: Rack-test
---
```rb
get 'url'
post 'url', 'name' => 'john'
put
patch
delete
options
head
authorize 'user', 'pass'
env 'rack.session', csrf: 'token'
header 'Content-Type', 'text/html'
```
See [rack/test.rb](https://github.com/brynary/rack-test/blob/master/lib/rack/test.rb).