{"id":15797256,"url":"https://github.com/reelyactive/beaver","last_synced_at":"2026-02-17T17:04:31.879Z","repository":{"id":57178050,"uuid":"51210394","full_name":"reelyactive/beaver","owner":"reelyactive","description":"Client-side utility to maintain an up-to-date hyperlocal context graph by consuming the real-time data stream from Pareto Anywhere APIs.  We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2026-01-23T17:17:02.000Z","size":1248,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-24T07:43:23.568Z","etag":null,"topics":["beaver","client-side","dynamb","pareto-anywhere","polling","raddec","socket-io","vanilla-javascript"],"latest_commit_sha":null,"homepage":"https://reelyactive.github.io/beaver/","language":"JavaScript","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/reelyactive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-06T16:30:57.000Z","updated_at":"2026-01-23T17:17:06.000Z","dependencies_parsed_at":"2022-08-30T05:32:29.193Z","dependency_job_id":"4ada0d79-7041-45c4-bbca-4e8a4a1edee4","html_url":"https://github.com/reelyactive/beaver","commit_stats":{"total_commits":85,"total_committers":1,"mean_commits":85.0,"dds":0.0,"last_synced_commit":"8a4145abc89c2e96fb51a1164f989bf3ccf2b294"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reelyactive/beaver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbeaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbeaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbeaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbeaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/beaver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbeaver/sbom","scorecard":{"id":768424,"data":{"date":"2025-08-11","repo":{"name":"github.com/reelyactive/beaver","commit":"c3644e5d071a02ef74259cee24e7378a5f4bcfa6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T01:32:27.718Z","repository_id":57178050,"created_at":"2025-08-23T01:32:27.719Z","updated_at":"2025-08-23T01:32:27.719Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29550883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["beaver","client-side","dynamb","pareto-anywhere","polling","raddec","socket-io","vanilla-javascript"],"created_at":"2024-10-05T00:05:46.740Z","updated_at":"2026-02-17T17:04:31.873Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"beaver.js\n=========\n\n__beaver__ maintains an up-to-date [hyperlocal context](https://www.reelyactive.com/context/) graph by consuming the real-time data stream from [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) APIs.\n\n![Overview of beaver.js](https://reelyactive.github.io/beaver/images/overview.png)\n\n__beaver__ is lightweight client-side JavaScript that runs in the browser.  See a live demo using the code in this repository at: [reelyactive.github.io/beaver](https://reelyactive.github.io/beaver)\n\n\nHello beaver!\n-------------\n\nInclude in an _index.html_ file the __beaver.js__ script:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"js/beaver.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"js/app.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nInclude in a _js/app.js_ the code to connect to a Pareto Anywhere instance:\n\n```javascript\nbeaver.stream('http://pareto.local', { /* Options: see below */ });\n```\n\nOpen the _index.html_ file in a web browser for __beaver__ to connect to the Pareto Anywhere instance and begin maintaining the hyperlocal context graph.\n\n\nSupported functions\n-------------------\n\n### stream\n\n```javascript\nlet serverRootUrl = 'http://pareto.local';\nlet options = { /* See below */ };\n\nlet streams = beaver.stream(serverRootUrl, options);\n```\n\nIf the serverRootUrl is provided, and valid, __beaver__ will HTTP GET the /context route once to establish the hyperlocal context graph.  The options are as follows:\n\n| Property         | Default | Description                                     |\n|:-----------------|:--------|:------------------------------------------------|\n| deviceSignature  | null    | Specific device to stream (default all devices) |\n| io               | null    | Socket.IO dependency                            |\n| ioUrl            | null    | Override default URL for Socket.IO to listen on |\n| wsUrl            | null    | Specific URL for WebSocket to listen on         |\n| reviseTimestamps | false   | Set incoming event timestamps to current time   |\n\nFor example, to stream using Socket.IO from a [Pareto Anywhere](https://github.com/reelyactive/pareto-anywhere/) server at pareto.local, filtering for a specific device:\n\n```javascript\n// Include \u003cscript src=\"js/socket.io.min.js\"\u003e\u003c/script\u003e in the index.html\nlet options = { deviceSignature: \"bada55beac04/2\", io: io };\n\nbeaver.stream('http://pareto.local', options);\n```\n\nFor example, to stream using WebSockets from a [Pareto Anywhere for Azure](https://github.com/reelyactive/pareto-anywhere-azure/) server at pareto-anywhere.azurewebsites.net:\n\n```javascript\nlet options = { wsUrl: 'ws://pareto-anywhere.azurewebsites.net' };\n\nbeaver.stream(null, options);\n```\n\n\n### poll\n\n```javascript\nlet serverRootUrl = 'http://pareto.local';\nlet options = { intervalMilliseconds: 5000 }; // {} to instead poll just once\n\nbeaver.poll(serverRootUrl, options);\n```\n\nUse `beaver.on('poll')` as notification of when each poll completes and the Map of `beaver.devices` is updated.\n\nThe options are as follows:\n\n| Property             | Default | Description                                |\n|:---------------------|:--------|:-------------------------------------------|\n| intervalMilliseconds | null    | Interval to poll (default poll just once)  |\n| deviceSignature      | null    | Specific device to poll (default all devices) |\n| clearDevices         | false   | Clear all devices before polling           |\n| reviseTimestamps     | false   | Set incoming event timestamps to current time |\n\n\n### on\n\n```javascript\nbeaver.on('connect', () =\u003e {});\nbeaver.on('raddec', (raddec) =\u003e { /* radio decoding data */ });\nbeaver.on('dynamb', (dynamb) =\u003e { /* dynamic ambient data */ });\nbeaver.on('spatem', (spatem) =\u003e { /* spatial-temporal data */ });\nbeaver.on('appearance', (deviceSignature, device) =\u003e {\n  /* beaver.devices added entity */\n});\nbeaver.on('disappearance', (deviceSignature) =\u003e {\n  /* beaver.devices removed entity */\n});\nbeaver.on('poll' () =\u003e { /* beaver.devices is updated */ });\nbeaver.on('stats', (stats) =\u003e {\n  // stats = {\n  //     numberOfDecodings: Number,\n  //     eventsPerSecond: { raddec: Number, dynamb: Number, spatem: Number }\n  // }\n});\nbeaver.on('error', (error) =\u003e { /* error.message */ });\nbeaver.on('disconnect', (reason) =\u003e { /* disconnect reason */ });\n```\n\nRead the [reelyActive Developers Cheatsheet](https://reelyactive.github.io/diy/cheatsheet/) to learn more about the raddec, dynamb \u0026 spatem data structures.\n\n\n### reset\n\n```javascript\nlet options = { /* See below */ };\n\nbeaver.reset(options);\n```\n\nDisconnect from all Socket.IO and WebSocket streams, and stop any polling loops.  The options are as follows:\n\n| Property             | Default | Description                                |\n|:---------------------|:--------|:-------------------------------------------|\n| clearDevices         | false   | Clear `beaver.devices`                     |\n\n\nSupported variables\n-------------------\n\n| Variable         | Type | Description                                       |\n|:-----------------|:-----|:--------------------------------------------------|\n| `beaver.devices` | Map  | Hyperlocal context graph: device signature as key |\n\n\n![beaver logo](https://reelyactive.github.io/beaver/images/beaver-bubble.png)\n\n\nWhat's in a name?\n-----------------\n\nAfter humans, beavers are the animals with the greatest impact on their ecosystem.  Industrious and ingenious hydrological engineers, beavers build dams, filling the ponds which provide them food and protection.  In turn, these basins of water provide food and habitat for diverse fauna and flora, contributing to a thriving ecosystem.\n\nIntroduced to the web browser habitat in 2016, beaver.js has adapted to fill ponds in your computer’s memory, collecting the steady stream of real-time events from an upstream source.  In turn, this pool of data provides a staple food for other client-side Javascript species such as the occasional migratory [cormorant.js](https://github.com/reelyactive/cormorant).\n\nOh yeah, and the beaver is the [national animal of Canada](https://en.wikipedia.org/wiki/National_symbols_of_Canada) eh?  And the oversized rodent is currently celebrating its 40th anniversary as the [mascot of the 1976 Olympics](https://en.wikipedia.org/wiki/Amik) of our native Montreal.  We wood be dammed not to chews it as a mascot!\n\nDon’t like our punny ending?  Why not _lodge_ a complaint?\n\n\nProject History\n---------------\n\n__beaver__ v2.0.0 was released in February 2023.\n\n__beaver.js__ v1.0.0 was released in July 2019, superseding all earlier versions, the latest of which remains available in the [release-0.1 branch](https://github.com/reelyactive/beaver/tree/release-0.1).\n\n\nModular Architecture\n--------------------\n\n__beaver.js__ is easily combined with the following complementary client-side modules:\n- [cormorant.js](https://github.com/reelyactive/cormorant)\n- [charlotte.js](https://github.com/reelyactive/charlotte)\n- [cuttlefish.js](https://github.com/reelyactive/cuttlefish)\n\nLearn more about the [reelyActive Open Source Software packages](https://reelyactive.github.io/diy/oss-packages/), all of which are bundled together as [Pareto Anywhere](https://github.com/reelyactive/pareto-anywhere) open source IoT middleware.\n\nContributing\n------------\n\nDiscover [how to contribute](CONTRIBUTING.md) to this open source project which upholds a standard [code of conduct](CODE_OF_CONDUCT.md).\n\n\nSecurity\n--------\n\nConsult our [security policy](SECURITY.md) for best practices using this open source software and to report vulnerabilities.\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2016-2026 [reelyActive](https://www.reelyactive.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fbeaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fbeaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fbeaver/lists"}