Comparing version 1.1.27 to 1.1.28
{ | ||
"name": "croner", | ||
"version": "1.1.27", | ||
"version": "1.1.28", | ||
"description": "Isomorphic JavaScript cron parser and scheduler.", | ||
@@ -13,3 +13,3 @@ "author": "Hexagon <github.com/hexagon>", | ||
"scripts": { | ||
"test": "npm run test:lint && npm run test:mocha", | ||
"test": "npm run test:mocha", | ||
"test:mocha": "mocha", | ||
@@ -16,0 +16,0 @@ "test:lint": "eslint ./src/croner.js", |
@@ -9,3 +9,3 @@ | ||
Supports node.js, require.js and stand alone usage. | ||
Supports node.js, require.js, es-module and stand alone usage. | ||
@@ -26,3 +26,3 @@ ```html | ||
## Node.js or browser ESM (e.g. WebPack) | ||
## Node.js | ||
@@ -32,7 +32,7 @@ ```npm install croner``` | ||
## cdn (client) | ||
## CDN | ||
Copy and paste one of the following script tags. | ||
**Minified** | ||
**Minified normal module (umd)** | ||
@@ -43,7 +43,5 @@ ```html | ||
**Full** | ||
**Minified ESM-module** | ||
```html | ||
<script src="//cdn.56k.guru/js/croner/latest/croner.js"></script> | ||
``` | ||
See usage-section for more examples, including ESM usage. | ||
@@ -55,3 +53,3 @@ | ||
* Unpack | ||
* Grab croner.js (or croner.min.js) from the [lib/](/lib) folder | ||
* Grab croner.min.js or croner.min.mjs from the [dist/](/dist) folder | ||
@@ -62,3 +60,3 @@ | ||
## Node.js commonjs | ||
## Node.js/CommonJS | ||
@@ -73,13 +71,37 @@ ```javascript | ||
## Node.js ESM, Browser ESM | ||
## Browser ESM | ||
```javascript | ||
import { Cron } from 'croner'; | ||
Import croner.min.mjs from cdn or manually, see installation section above. | ||
Cron('* * * * * *', function () { | ||
```html | ||
<script type="module"> | ||
import Cron from 'https://cdn.jsdelivr.net/npm/croner@1.1.27/dist/croner.min.mjs'; | ||
Cron('* * * * * *', () => { | ||
console.log('This will run every second'); | ||
}); | ||
</script> | ||
``` | ||
## Browser ESM with import-maps | ||
Import croner.min.mjs from cdn or manually, see installation section above. | ||
```html | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"croner": "https://cdn.jsdelivr.net/npm/croner@1.1.27/dist/croner.min.mjs" | ||
} | ||
} | ||
</script> | ||
<script type="module"> | ||
import Cron from 'croner'; | ||
Cron('* * * * * *', () => { | ||
console.log('This will run every second'); | ||
}); | ||
</script> | ||
``` | ||
## Browser, stand-alone | ||
@@ -98,3 +120,3 @@ | ||
Include croner.js in your preferred way, it will register itself as a require.js module. | ||
Include croner.min.js in your preferred way, it will register itself as a require.js module. | ||
@@ -101,0 +123,0 @@ ```javascript |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
57573
262
0