Skip to content

Commit

Permalink
feat: Ajouter le support de Bun.
Browse files Browse the repository at this point in the history
  • Loading branch information
regseb committed Feb 13, 2024
1 parent c0fff12 commit 40d2c1c
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,25 @@ cron.stop();

## Installation

### Node.js

Cronnor est publiée dans [npm][link-npm].
Cronnor est publiée dans [npm][link-npm] (ses CDN :
[esm.sh](https://esm.sh/cronnor),
[jsDelivr](https://www.jsdelivr.com/package/npm/cronnor),
[UNPKG](https://unpkg.com/browse/cronnor/)) et
[Deno](https://deno.land/x/cronnor).

```JavaScript
// Node.js et Bun (après `npm install cronnor`) :
import Cron from "cronnor";
```

### Deno

La bibliothèque est disponible dans [Deno](https://deno.land/x/cronnor).
// Navigateurs :
import Cron from "https://esm.sh/cronnor@2";
import Cron from "https://cdn.jsdelivr.net/npm/cronnor@2";
import Cron from "https://unpkg.com/cronnor@2";

```JavaScript
// Deno :
import Cron from "https://deno.land/x/cronnor/mod.js";
```

### Navigateurs

Elle est aussi accessible directement avec le CDN
[esm.sh](https://esm.sh/cronnor) (ou
[jsDelivr](https://www.jsdelivr.com/package/npm/cronnor),
[UNPKG](https://unpkg.com/browse/cronnor/)) :

```JavaScript
import Cron from "https://esm.sh/cronnor@2";
// import Cron from "https://cdn.jsdelivr.net/npm/cronnor@2";
// import Cron from "https://unpkg.com/cronnor@2";
```

## API

- [Cron](#cron)
Expand All @@ -85,8 +75,8 @@ import Cron from "https://esm.sh/cronnor@2";

```JavaScript
import Cron from "cronnor/cron";
// import { Cron } from "https://deno.land/x/cronnor/mod.js";
// import Cron from "https://esm.sh/cronnor@2/cron";
// import { Cron } from "https://deno.land/x/cronnor/mod.js";
```

#### `new Cron(cronex, func, [options])`
Expand Down Expand Up @@ -159,8 +149,8 @@ Calcule la prochaine date respectant une des expressions _cron_ de la tâche.

```JavaScript
import CronExp from "cronnor/cronexp";
// import { CronExp } from "https://deno.land/x/cronnor/mod.js";
// import CronExp from "https://esm.sh/cronnor@2/cronexp";
// import { CronExp } from "https://deno.land/x/cronnor/mod.js";
```

#### `new CronExp(pattern)`
Expand Down Expand Up @@ -196,8 +186,8 @@ Calcule la prochaine date respectant l'expression.

```JavaScript
import At from "cronnor/at";
// import { At } from "https://deno.land/x/cronnor/mod.js";
// import At from "https://esm.sh/cronnor@2/at";
// import { At } from "https://deno.land/x/cronnor/mod.js";
```

#### `new At(date, func, [options])`
Expand Down

0 comments on commit 40d2c1c

Please sign in to comment.