Skip to content

Commit

Permalink
Release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Oct 1, 2015
1 parent c409294 commit f684993
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@


## 1.0.1 - 2015-10-01
- Release v1.0.1 / npm@v1.0.1
- fixes #2 bug
- pass used Promise constructor for promisify-ing to the returned promise
+ it will be native promise constructor if native promise available
+ or custom passed promise module constructor
+ or Bluebird constructor

**example**

```js
'use strict'

var fs = require('fs')
var redolent = require('redolent')
var readFile = redolent(fs.readFileSync, require('q'))
var promise = readFile('package.json', 'utf8')

console.log(promise.Prome)
//=> `q` constructor (if native promise not available)
// or native promise constructor
console.log(promise.Prome.___customPromise) //=> true
console.log(promise.___customPromise) //=> true
```

- allow passing custom promise module through static properties
+ till now it was able to do this only if you pass promise module as second argument

**example**

```js
'use strict'

var fs = require('fs')
var redolent = require('redolent')

// `pinkie` is promise module
// will use `pinkie` if not native promise is available
redolent.promise = require('pinkie')

var readFile = redolent(fs.readFileSync)

// will use `q` promise if native not available
// readFile.promise = require('q')

var promise = readFile('package.json')
promise.then(function (res) {
console.log(res) //=> Buffer
console.log(promise.Prome)
//=> `pinkie` constructor (if native promise not available)
// or native promise constructor
console.log(promise.Prome.___customPromise) //=> true
console.log(promise.___customPromise) //=> true
})
```

## 1.0.0 - 2015-09-28
- Release v1.0.0 / npm@v1.0.0
- implement :cat2:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redolent",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple promisify a callback-style function with sane defaults.",
"repository": "tunnckoCore/redolent",
"author": "Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)",
Expand Down

0 comments on commit f684993

Please sign in to comment.