Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / onetime / readme.md
index 9ecd1b24db12d7d47e43c0137b56fa8b6894173f..2d133d3a09c6c65b9186d4d88894b6c887ad7e1e 100644 (file)
@@ -1,4 +1,4 @@
-# onetime [![Build Status](https://travis-ci.org/sindresorhus/onetime.svg?branch=master)](https://travis-ci.org/sindresorhus/onetime)
+# onetime [![Build Status](https://travis-ci.com/sindresorhus/onetime.svg?branch=master)](https://travis-ci.com/github/sindresorhus/onetime)
 
 > Ensure a function is only called once
 
@@ -6,14 +6,12 @@ When called multiple times it will return the return value from the first call.
 
 *Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty and extending `Function.prototype`.*
 
-
 ## Install
 
 ```
 $ npm install onetime
 ```
 
-
 ## Usage
 
 ```js
@@ -23,9 +21,9 @@ let i = 0;
 
 const foo = onetime(() => ++i);
 
-foo(); //=> 0
-foo(); //=> 0
-foo(); //=> 0
+foo(); //=> 1
+foo(); //=> 1
+foo(); //=> 1
 
 onetime.callCount(foo); //=> 3
 ```
@@ -41,10 +39,9 @@ foo();
 //=> Error: Function `foo` can only be called once
 ```
 
-
 ## API
 
-### onetime(fn, [options])
+### onetime(fn, options?)
 
 Returns a function that only calls `fn` once.
 
@@ -56,11 +53,11 @@ Function that should only be called once.
 
 #### options
 
-Type: `Object`
+Type: `object`
 
 ##### throw
 
-Type: `boolean`<br>
+Type: `boolean`\
 Default: `false`
 
 Throw an error when called more than once.
@@ -72,6 +69,8 @@ Returns a number representing how many times `fn` has been called.
 Note: It throws an error if you pass in a function that is not wrapped by `onetime`.
 
 ```js
+const onetime = require('onetime');
+
 const foo = onetime(() => {});
 
 foo();
@@ -88,7 +87,8 @@ Type: `Function`
 
 Function to get call count from.
 
+## onetime for enterprise
 
-## License
+Available as part of the Tidelift Subscription.
 
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+The maintainers of onetime and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-onetime?utm_source=npm-onetime&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)