{"id":22123404,"url":"https://github.com/drpaulbrewer/maybe-json","last_synced_at":"2025-08-03T21:35:47.711Z","repository":{"id":19103980,"uuid":"86199357","full_name":"DrPaulBrewer/maybe-json","owner":"DrPaulBrewer","description":"Google Cloud Function helper to log and transform bucket events to Promises of new json file metadata and json data","archived":false,"fork":false,"pushed_at":"2025-03-10T07:01:05.000Z","size":16,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T08:21:36.366Z","etag":null,"topics":["google-cloud-functions","json-files","monitor-bucket"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrPaulBrewer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-26T01:22:26.000Z","updated_at":"2017-03-26T07:51:32.000Z","dependencies_parsed_at":"2025-03-10T08:20:26.041Z","dependency_job_id":"3c8c6c1d-4023-47a3-bcd1-fd09438486c9","html_url":"https://github.com/DrPaulBrewer/maybe-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fmaybe-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fmaybe-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fmaybe-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fmaybe-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrPaulBrewer","download_url":"https://codeload.github.com/DrPaulBrewer/maybe-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245227013,"owners_count":20580787,"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":["google-cloud-functions","json-files","monitor-bucket"],"created_at":"2024-12-01T15:32:59.177Z","updated_at":"2025-03-24T07:29:13.648Z","avatar_url":"https://github.com/DrPaulBrewer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maybe-json\n\nGoogle Cloud Function helper to log and transform bucket events to Promises of new json file metadata and json data\n\nThis is a helper or skeleton for writing back-end events that trigger on change to a google storage bucket.\n\nAll uploaded json file contents are logged, and then returned from a new Promise, provided file size \u003c 1 MB\n\n## Usage\n\n    const maybejSON = require('maybe-json');\n\n    exports.myGoogleCloudFunction = function myGoogleCloudFunction(event){\n        return (maybeJSON(event)\n\t        .then(function(filedata){\n\t\t   if (filedata) {  // note, filedata can be \"undefined\" for non-file events or deletion events\n\t\t       const file = filedata.file;   // the google cloud function file event\n\t\t       const data = filedata.data;   // the parsed json data contained in the new file\n\t\t       // do something useful with the data\n\t\t   }\n\t\t })\n\t\t );\n    }\n\n### Copyright\n\nCopyright 2017, Paul Brewer, Economic and Financial Technology Consulting LLC \u003cdrpaulbrewer@eaftc.com\u003e\n\n### License\n\nMIT\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrpaulbrewer%2Fmaybe-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrpaulbrewer%2Fmaybe-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrpaulbrewer%2Fmaybe-json/lists"}