twice-call-wrapper 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var composeFunction = require('compose-function')
2
2
 
3
3
  module.exports = function twiceCallWrapper(fn) {
4
- return composeFunction(fn, fn)
4
+ return composeFunction(...([fn]).flatMap(item => [item, item]))
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twice-call-wrapper",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A small wrapper that calls a function twice: fn(fn(args))",
5
5
  "keywords": [
6
6
  "function",