@netlify/functions
Advanced tools
Comparing version 0.10.0 to 0.11.0-rc
export { builder } from './lib/builder'; | ||
export { schedule } from './lib/schedule'; | ||
export * from './function'; |
@@ -13,5 +13,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.builder = void 0; | ||
exports.schedule = exports.builder = void 0; | ||
var builder_1 = require("./lib/builder"); | ||
Object.defineProperty(exports, "builder", { enumerable: true, get: function () { return builder_1.builder; } }); | ||
var schedule_1 = require("./lib/schedule"); | ||
Object.defineProperty(exports, "schedule", { enumerable: true, get: function () { return schedule_1.schedule; } }); | ||
__exportStar(require("./function"), exports); |
@@ -5,3 +5,3 @@ { | ||
"types": "./dist/main.d.ts", | ||
"version": "0.10.0", | ||
"version": "0.11.0-rc", | ||
"description": "JavaScript utilities for Netlify Functions", | ||
@@ -62,3 +62,3 @@ "files": [ | ||
"@commitlint/config-conventional": "^13.0.0", | ||
"@netlify/eslint-config-node": "^3.3.8", | ||
"@netlify/eslint-config-node": "^3.3.10", | ||
"ava": "^2.4.0", | ||
@@ -65,0 +65,0 @@ "husky": "^4.3.8", |
@@ -52,2 +52,26 @@ # ![functions](functions.png) | ||
### Scheduled Functions (currently in beta) | ||
To use Scheduled Functions, wrap your function handler with the `schedule` function. | ||
- With JavaScript: | ||
```js | ||
const { schedule } = require('@netlify/functions') | ||
exports.handler = schedule('5 4 * * *', async () => { | ||
console.log("It's 04:05 AM!") | ||
}) | ||
``` | ||
- With TypeScript: | ||
```ts | ||
import { schedule } from '@netlify/functions' | ||
export const handler = schedule("5 4 * * *", async () => { | ||
console.log("It's 04:05 AM!") | ||
}) | ||
``` | ||
### TypeScript typings | ||
@@ -54,0 +78,0 @@ |
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
28265
25
498
105