Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ultirequiem/stable-fn
🦾 Ensure the same input always produces the same output
https://github.com/ultirequiem/stable-fn
deno javas npm testing typescript
Last synced: 2 months ago
JSON representation
🦾 Ensure the same input always produces the same output
- Host: GitHub
- URL: https://github.com/ultirequiem/stable-fn
- Owner: UltiRequiem
- License: mit
- Created: 2022-03-21T18:15:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T00:17:16.000Z (9 months ago)
- Last Synced: 2024-10-26T06:52:14.510Z (3 months ago)
- Topics: deno, javas, npm, testing, typescript
- Language: TypeScript
- Homepage: https://stable-fn.js.org
- Size: 17.6 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# stable-fn
[![codecov](https://codecov.io/gh/ultirequiem/stable-fn/branch/main/graph/badge.svg)](https://codecov.io/gh/ultirequiem/stable-fn)
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/stable_fn/mod.ts)> Ensure the same input always produces the same output.
Useful for stress testing functions in your unit tests to make sure their
behaviors are consistent.## Usage
### [Deno 🚀](https://deno.land/x/stable_fn)
```typescript
import { stableFunction } from "https://deno.land/x/stable_fn/mod.ts";
import { randomItem } from "https://deno.land/x/random_item/mod.ts";stableFunction(() => true); //=> true
stableFunction(() => randomItem(["a", "b", "c"])); //=> false
```### [Node.js 🐢](https://www.npmjs.com/package/@ultirequiem/stable-fn)
```ts
import { stableFunction } from "@ultirequiem/stable-fn";
```### Browser
Using
[type module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
🍱- [esm.sh](https://esm.sh/@ultirequiem/stable-fn)
- [skypack](https://cdn.skypack.dev/@ultirequiem/stable-fn)
Using a plain
[script tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) 👇- [jsdelivr](https://cdn.jsdelivr.net/npm/@ultirequiem/stable-fn)
- [unpkg](https://unpkg.com/@ultirequiem/stable-fn)
You have the same API on all of this platforms.
## Documentation
[Autogenerated Documentation](https://doc.deno.land/https://deno.land/x/stable_fn/mod.ts)
😎## Support
Open an Issue, I will check it a soon as possible 👀
If you want to hurry me up a bit
[send me a tweet](https://twitter.com/intent/tweet?text=%40UltiRequiem%20) 😆Consider [supporting me on Patreon](https://patreon.com/UltiRequiem) if you like
my work 🚀Don't forget to start the repo ⭐
## Licence
Licensed under the MIT License.