Skip to content

Commit

Permalink
Rename preset to createPreset
Browse files Browse the repository at this point in the history
  • Loading branch information
yamiteru committed Apr 3, 2023
1 parent 95d841a commit ab86d30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ For the most accurate results, it is recommended to run benchmark suites in diff
## Example

```ts
import { preset, useTerminal } from "isitfast";
import { createPreset, useTerminal } from "isitfast";

// define suite preset with options
const defaultSuite = preset();
const defaultSuite = createPreset();

// define your suite with benchmarks
const testBenchmark = defaultSuite("Test", {
Expand All @@ -61,7 +61,7 @@ const testBenchmark = defaultSuite("Test", {
Creates a suite preset with the provided options.

```ts
const suite = preset({
const suite = createPreset({
// options
});
```
Expand Down
4 changes: 2 additions & 2 deletions examples/arrayLoops.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { preset } from "../src";
import { createPreset } from "../src";
import { useTerminal } from "../src/modes";

const LENGTH = 1_000;
const DATA = [...new Array(LENGTH)].map(() => Math.random() * 10);
const RESULT = { _: 0 };

const defaultSuite = preset();
const defaultSuite = createPreset();
const emptyFunctions = defaultSuite("Array loops", {
for: () => {
for (let i = 0; i < LENGTH; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions examples/emptyFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { preset } from "../src";
import { createPreset } from "../src";
import { useTerminal } from "../src/modes";

const defaultSuite = preset();
const defaultSuite = createPreset();
const emptyFunctions = defaultSuite("Empty functions", {
emptyAsync: async () => {
/* */
Expand Down

0 comments on commit ab86d30

Please sign in to comment.