Skip to content

Commit

Permalink
update docs/description
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Jan 17, 2016
1 parent 1044c90 commit 5ab47d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# [letta][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url]

> Let's move to promises! Drop-in replacement for [`co@4`](https://github.com/tj/co), but on steroids. Accepts sync, async and generator functions. Passing all [`co@4` tests](./test/co).
> Let's move to promises! Drop-in replacement for [`co@4`](https://github.com/tj/co), but on steroids. Accepts everything from sync, async and generator functions to string, array, stream, number and so on. Built with [redolent](https://github.com/hybridables/redolent)/[relike](https://github.com/hybridables/relike)/[relike-all](https://github.com/hybridables/relike-all) - see them for more information.
Passing all [`co@4` tests](./test/co).

Combine with [letta-value](https://github.com/hybridables/letta-value) to handle completion and errors of everything (including Observerables and Streams).

[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]

Expand All @@ -12,13 +15,14 @@ npm i letta --save


## Features
> Accept everything from sync function to generator functions.
> Accepts everything from sync, async and generator functions to string, array, stream, number and so on.
- sync functions
- async (callback) functions
- generators and generator functions
- accept and works with javascript internal functions like `JSON.stringify` and `JSON.parse`
- graceful handling of errors, uncaught exceptions, rejections and optional arguments
- tranform everything to promise


## Platform Compatibility
Expand All @@ -40,11 +44,11 @@ io.js is supported out of the box, you can use `letta` without flags or polyfill
const letta = require('letta')
```

### [letta](./index.js#L35)
### [letta](./index.js#L33)
> Control flow now and then.
- `<fn>` **{Function}** also generator function
- `[args]` **{Mixed}** any number of arguments, that will be passed to `fn`
- `[val]` **{Mixed}** any type of value
- `[args...]` **{Mixed}** any number of any type of arguments, if `val` function they are passed to it
- `return` **{Promise}**

**Example**
Expand All @@ -62,7 +66,7 @@ letta((foo, bar, baz) => {
### [.wrap](./index.js#L75)
> Convert a generator into a regular function that returns a `Promise`.
- `<fn>` **{Function}** also generator function
- `[val]` **{Mixed}** any type of value
- `return` **{Function}** normal function

**Example**
Expand All @@ -78,7 +82,7 @@ fn(123).then(function (val) {
}, console.error)
```

### [.promise](./index.js#L37)
### [.promise](./index.js#L38)
> Passing custom promise module to be used (also require) only when enviroment don't have support for native `Promise`. For example, you can pass `q` to be used when node `0.10`.
**Example**
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ var utils = require('./utils')
* ```
*
* @name letta
* @param {Function} `<fn>` also generator function
* @param {Mixed} `[args]`any number of arguments, that will be passed to `fn`
* @param {Mixed} `[val]` also generator function
* @param {Mixed} `[args..]` any number of any type of arguments, if `val` function they are passed to it
* @return {Promise}
* @api public
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "letta",
"version": "0.3.1",
"description": "Let's move to promises! Drop-in replacement for `co@4`, but on steroids. Accepts sync, async and generator functions.",
"description": "Let's move to promises! Drop-in replacement for `co@4`, but on steroids. Accepts everything from sync, async and generator functions to string, array, stream, number and so on. Built with `redolent`/`relike`/relike-all` - see them for more information.",
"repository": "hybridables/letta",
"author": "Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)",
"main": "index.js",
Expand Down

0 comments on commit 5ab47d4

Please sign in to comment.