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).