From b40e7629b14fe1f43495e4351ddfe3804c405338 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Thu, 15 Oct 2015 18:56:20 +0800 Subject: [PATCH] Add lodash, rack-test --- lodash.md | 31 +++++++++++++++++++++++++++++++ rack-test.md | 19 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 lodash.md create mode 100644 rack-test.md diff --git a/lodash.md b/lodash.md new file mode 100644 index 000000000..f3dd596ec --- /dev/null +++ b/lodash.md @@ -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) +``` diff --git a/rack-test.md b/rack-test.md new file mode 100644 index 000000000..e09283cf7 --- /dev/null +++ b/rack-test.md @@ -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).