FizzBuzz powered by Jev, TypeSafe AI's System One model.
$ npm install fizzbuzz-jevSet the TYPESAFE_API_KEY environment variable, or pass apiKey as the second argument.
import { fizzbuzz } from "fizzbuzz-jev";
for (let i = 1; i <= 15; i++) {
const result = await fizzbuzz(i); // Key from TYPESAFE_API_KEY environment variable
// or
// const result = await fizzbuzz(i, { apiKey: "YOUR_API_KEY" });
console.log(result);
}1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz| Parameter | Type | Description |
|---|---|---|
value |
number |
The number to evaluate. |
config |
TypeSafeClientConfig? |
Options passed to TypeSafeClient (e.g. apiKey). |
Returns Promise<"Fizz" | "Buzz" | "FizzBuzz" | number>.