{"id":13451722,"url":"https://github.com/netlify/functions","last_synced_at":"2025-05-16T12:08:08.379Z","repository":{"id":39642248,"uuid":"341194977","full_name":"netlify/functions","owner":"netlify","description":"JavaScript and TypeScript utilities for Netlify Functions.","archived":false,"fork":false,"pushed_at":"2025-04-10T09:18:28.000Z","size":2749,"stargazers_count":45,"open_issues_count":12,"forks_count":16,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-12T06:19:26.407Z","etag":null,"topics":["aws","functions","javascript","lambda-functions","netlify","netlify-functions","netlify-lambda","netlify-lambda-functions","nodejs","production","serverless","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@netlify/functions","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-22T12:35:13.000Z","updated_at":"2025-04-10T09:17:53.000Z","dependencies_parsed_at":"2024-01-08T03:27:55.153Z","dependency_job_id":"68909203-0bfd-423f-a465-5a3e39d1d503","html_url":"https://github.com/netlify/functions","commit_stats":{"total_commits":482,"total_committers":29,"mean_commits":"16.620689655172413","dds":0.2614107883817427,"last_synced_commit":"53b7bd093957fbccb75a486497fd1b8b797411a5"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Ffunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Ffunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Ffunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Ffunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlify","download_url":"https://codeload.github.com/netlify/functions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525274,"owners_count":21118639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","functions","javascript","lambda-functions","netlify","netlify-functions","netlify-lambda","netlify-lambda-functions","nodejs","production","serverless","typescript"],"created_at":"2024-07-31T07:01:00.470Z","updated_at":"2025-04-12T06:19:40.263Z","avatar_url":"https://github.com/netlify.png","language":"TypeScript","readme":"# ![functions](functions.png)\n\n[![Build](https://github.com/netlify/functions/workflows/Build/badge.svg)](https://github.com/netlify/functions/actions)\n[![Node](https://img.shields.io/node/v/@netlify/functions.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/functions)\n\nJavaScript and TypeScript utilities for [Netlify Functions](https://docs.netlify.com/functions/overview/).\n\n## Installation\n\n```\nnpm install @netlify/functions\n```\n\n## Usage\n\n### On-demand Builders\n\nTo use On-demand Builders, wrap your function handler with the `builder` function.\n\n- With JavaScript:\n\n  ```js\n  const { builder } = require('@netlify/functions')\n\n  const handler = async (event, context) =\u003e {\n    return {\n      statusCode: 200,\n      body: JSON.stringify({ message: 'Hello World' }),\n    }\n  }\n\n  exports.handler = builder(handler)\n  ```\n\n- With TypeScript:\n\n  ```ts\n  import { builder, Handler } from '@netlify/functions'\n\n  const myHandler: Handler = async (event, context) =\u003e {\n    return {\n      statusCode: 200,\n      body: JSON.stringify({ message: 'Hello World' }),\n    }\n  }\n\n  const handler = builder(myHandler)\n\n  export { handler }\n  ```\n\n### Scheduled Functions (currently in beta)\n\nTo use Scheduled Functions, wrap your function handler with the `schedule` function.\n\n- With JavaScript:\n\n  ```js\n  const { schedule } = require('@netlify/functions')\n\n  exports.handler = schedule('5 4 * * *', async () =\u003e {\n    console.log(\"It's 04:05 AM!\")\n  })\n  ```\n\n- With TypeScript:\n\n  ```ts\n  import { schedule } from '@netlify/functions'\n\n  export const handler = schedule(\"5 4 * * *\", async () =\u003e {\n    console.log(\"It's 04:05 AM!\")\n  })\n  ```\n\n### TypeScript typings\n\nThis module exports typings for authoring Netlify Functions in TypeScript.\n\n```ts\nimport { Handler } from '@netlify/functions'\n\nconst handler: Handler = async (event, context) =\u003e {\n  return {\n    statusCode: 200,\n    body: JSON.stringify({ message: 'Hello World' }),\n  }\n}\n\nexport { handler }\n```\n\nThe following types are exported:\n\n- `Handler`\n- `HandlerCallback`\n- `HandlerContext`\n- `HandlerEvent`\n- `HandlerResponse`\n\n## Contributors\n\nPlease see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks\nfor contributing!\n","funding_links":[],"categories":["Uncategorized","HTML","Examples \u0026 Boilerplates"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Ffunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlify%2Ffunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Ffunctions/lists"}