@teleology/fp
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -125,2 +125,14 @@ "use strict"; | ||
}); | ||
}); | ||
var _nonce = require("./nonce"); | ||
Object.keys(_nonce).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _nonce[key]; | ||
} | ||
}); | ||
}); |
{ | ||
"name": "@teleology/fp", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A small collection of functional programming utils", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:icarus-sullivan/teleology-fp.git", |
@@ -182,5 +182,25 @@ # @teleology/fp | ||
## nonce | ||
Wraps a function and prevents it from being called more than `n` times. Optional second params is the number of times, default is `once`. | ||
Example: | ||
```javascript | ||
const { nonce } = require('@teleology/fp'); | ||
const log = nonce(console.log); | ||
log('hi'); // hi | ||
log('bonjour'); | ||
``` | ||
---- | ||
## Changelog | ||
**1.0.6** | ||
- Adding `once` function | ||
**1.0.4** | ||
@@ -187,0 +207,0 @@ - Adding a clean function to remove empty values |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11902
212
213