Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@netlify/functions

Package Overview
Dependencies
Maintainers
15
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/functions - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0-rc

dist/lib/schedule.d.ts

1

dist/main.d.ts
export { builder } from './lib/builder';
export { schedule } from './lib/schedule';
export * from './function';

4

dist/main.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc