<commit_before># function-with-timeout [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]

[travis-image]: https://img.shields.io/travis/feross/function-with-timeout.svg?style=flat
[travis-url]: https://travis-ci.org/feross/function-with-timeout
[npm-image]: https://img.shields.io/npm/v/function-with-timeout.svg?style=flat
[npm-url]: https://npmjs.org/package/function-with-timeout
[downloads-image]: https://img.shields.io/npm/dm/function-with-timeout.svg?style=flat
[downloads-url]: https://npmjs.org/package/function-with-timeout

### Ensure a function is always called within a timeout period

Accepts a function as input and returns a new function. If the returned function is
called before the timeout period (the default timeout is one second), it clears
the timeout and invokes the input function. If the returned function isn't called
before the timeout period, the input function is called regardless.

[![Sauce Test Status](https://saucelabs.com/browser-matrix/function-with-timeout.svg)](https://saucelabs.com/u/function-with-timeout)

Works in the browser, with [browserify](http://browserify.org/)! Module development sponsored by [Study Notes](https://www.apstudynotes.org).
<commit_msg>fix sauce image<commit_after># function-with-timeout [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]

[travis-image]: https://img.shields.io/travis/feross/function-with-timeout.svg?style=flat
[travis-url]: https://travis-ci.org/feross/function-with-timeout
[npm-image]: https://img.shields.io/npm/v/function-with-timeout.svg?style=flat
[npm-url]: https://npmjs.org/package/function-with-timeout
[downloads-image]: https://img.shields.io/npm/dm/function-with-timeout.svg?style=flat
[downloads-url]: https://npmjs.org/package/function-with-timeout

### Ensure a function is always called within a timeout period

Accepts a function as input and returns a new function. If the returned function is
called before the timeout period (the default timeout is one second), it clears
the timeout and invokes the input function. If the returned function isn't called
before the timeout period, the input function is called regardless.

[![Sauce Test Status](https://saucelabs.com/browser-matrix/function-w-timeout.svg)](https://saucelabs.com/u/function-w-timeout)

Works in the browser, with [browserify](http://browserify.org/)! Module development sponsored by [Study Notes](https://www.apstudynotes.org).

{'fraction_non_alphanumeric': 0.14703557312252966, 'fraction_numerical': 0.0, 'mean_word_length': 5.506426735218509, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7669570', 'n_tokens_mistral': 807, 'n_tokens_neox': 786, 'n_words': 188}