{"id":20760330,"url":"https://github.com/vanng822/emptygif","last_synced_at":"2025-04-30T05:48:20.420Z","repository":{"id":5141203,"uuid":"6307984","full_name":"vanng822/emptygif","owner":"vanng822","description":"Empty gif for nodejs","archived":false,"fork":false,"pushed_at":"2018-05-05T10:15:30.000Z","size":10,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T05:48:10.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cooperative-computing-lab/cctools","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanng822.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-20T10:46:25.000Z","updated_at":"2018-08-13T13:50:21.000Z","dependencies_parsed_at":"2022-09-01T01:13:22.228Z","dependency_job_id":null,"html_url":"https://github.com/vanng822/emptygif","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Femptygif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Femptygif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Femptygif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Femptygif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanng822","download_url":"https://codeload.github.com/vanng822/emptygif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651220,"owners_count":21621702,"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":[],"created_at":"2024-11-17T10:13:10.850Z","updated_at":"2025-04-30T05:48:20.388Z","avatar_url":"https://github.com/vanng822.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## emptygif\nEmpty gif for nodejs\n\n## Usage example\n\tvar emptygif = require('emptygif');\n\tvar express = require('express');\n\t\n\tapp.use(emptygif.emptyGif([{path:'/erreport', maxAge: 0}]))\n\t\n\t// OR\n\tapp.get('/tracking_pixel.gif', function(req, res, next) {\n\t\t\n\t\tprocess.nextTick(function() {\n\t\t\t// do tracking stuff\n\t\t});\n\t\t\n\t\temptygif.sendEmptyGif(req, res, {\n\t\t\t'Content-Type' : 'image/gif',\n\t\t\t'Content-Length' : emptygif.emptyGifBufferLength,\n\t\t\t'Cache-Control' : 'public, max-age=0' // or specify expiry to make sure it will call everytime\n\t\t});\n\t});\n\n## methods\n\n### emptyGif(configs)\n* `configs` Array of objects. Each object contain path, maxAge and callback. Path can be string or RegExp. maxAge is optional, default 86400000ms. Callback is for doing something with request such as statistics. For example:\n\n\t[{path: '/img/empty.gif', maxAge : 86400000, callback: function(req) { /* view counting code */}}]\n\t\nReturns\n* `function(req, res, next)` middleware\n\n### sendEmptyGif(req, res, headers)\n* `req` Request object\n* `res` Response object\n* `headers` Headers associated with this image.\n\t\n## Property\n### emptyGifBufferLength\nThe length of the image in case it is needed for customed headers for sendEmptyGif","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanng822%2Femptygif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanng822%2Femptygif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanng822%2Femptygif/lists"}