{"id":15434018,"url":"https://github.com/sebinsua/monitor-head-stream","last_synced_at":"2026-03-08T15:35:31.422Z","repository":{"id":57302413,"uuid":"80169846","full_name":"sebinsua/monitor-head-stream","owner":"sebinsua","description":"💦 Monitor the head of a stream.","archived":false,"fork":false,"pushed_at":"2017-02-02T20:22:39.000Z","size":70,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T23:12:55.083Z","etag":null,"topics":["continuous","follow","head","monitor","refresh","stream","tail","tailing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebinsua.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-27T00:39:35.000Z","updated_at":"2020-12-24T02:24:23.000Z","dependencies_parsed_at":"2022-09-20T19:51:19.717Z","dependency_job_id":null,"html_url":"https://github.com/sebinsua/monitor-head-stream","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Fmonitor-head-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Fmonitor-head-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Fmonitor-head-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Fmonitor-head-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebinsua","download_url":"https://codeload.github.com/sebinsua/monitor-head-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249366800,"owners_count":21258445,"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":["continuous","follow","head","monitor","refresh","stream","tail","tailing"],"created_at":"2024-10-01T18:36:44.921Z","updated_at":"2026-03-08T15:35:26.387Z","avatar_url":"https://github.com/sebinsua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `monitor-head-stream` [![Build Status](https://travis-ci.org/sebinsua/monitor-head-stream.png)](https://travis-ci.org/sebinsua/monitor-head-stream) [![npm version](https://badge.fury.io/js/monitor-head-stream.svg)](https://npmjs.org/package/monitor-head-stream)\n\u003e 💦 Monitor the head of a stream\n\nThis module polls streams of objects for their latest item(s).\n\nIt's sort of like `tail -f` for [`Stream`s](https://nodejs.org/api/stream.html), but acts upon the head of the stream.\n\nIt was created in order to help implement small-scale firehoses.\n\nOther applications might include sending alerts [via SMS](https://github.com/twilio/twilio-node) or [OSX notifications](https://github.com/mikaelbr/node-notifier) on breaking news or the mention of particular topics.\n\n## Example\n\n```js\nimport { TimelineStream } from 'scrape-twitter'\nimport JSONStream from 'JSONStream'\nimport pump from 'pump'\n\nimport monitorHeadStream from 'monitor-head-stream'\n\nconst createStream = () =\u003e new TimelineStream('POTUS')\nconst indexBy = obj =\u003e obj.id\nconst skipWhenPinned = obj =\u003e obj.isPinned === true\n\npump(\n  monitorHeadStream(createStream, indexBy, skipWhenPinned),\n  JSONStream.stringify('[\\n', ',\\n', '\\n]\\n'),\n  process.stdout\n)\n```\n\n## Install\n\n*With `yarn`*:\n```sh\nyarn add monitor-head-stream\n```\n\n*With `npm`*:\n```sh\nnpm install --save monitor-head-stream\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Fmonitor-head-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebinsua%2Fmonitor-head-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Fmonitor-head-stream/lists"}