{"id":19574678,"url":"https://github.com/stringparser/evented-stack","last_synced_at":"2026-05-13T22:31:42.374Z","repository":{"id":18395261,"uuid":"21576519","full_name":"stringparser/evented-stack","owner":"stringparser","description":"Evented, Array styled, stack for node","archived":false,"fork":false,"pushed_at":"2014-07-23T12:59:54.000Z","size":440,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-04T06:25:18.102Z","etag":null,"topics":[],"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/stringparser.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-07-07T15:50:59.000Z","updated_at":"2014-12-23T00:55:20.000Z","dependencies_parsed_at":"2022-09-09T23:40:38.775Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/evented-stack","commit_stats":null,"previous_names":["stringparser/stack"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/stringparser/evented-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fevented-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fevented-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fevented-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fevented-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/evented-stack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fevented-stack/sbom","scorecard":{"id":855288,"data":{"date":"2025-08-11","repo":{"name":"github.com/stringparser/evented-stack","commit":"436f420186c8a1be245dd35509eed9caa5e74ad2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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-23T23:45:19.364Z","repository_id":18395261,"created_at":"2025-08-23T23:45:19.364Z","updated_at":"2025-08-23T23:45:19.364Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33002582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: 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":[],"created_at":"2024-11-11T06:43:22.866Z","updated_at":"2026-05-13T22:31:42.358Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# evented stack\n\n [![NPM version](https://badge.fury.io/js/evented-stack.svg)](http://badge.fury.io/js/evented-stack)\n\n Evented, Array styled, stack for node\n\n  ```shell\n  npm install evented-stack\n  ```\n\n### Why\n  Wanted an Array like queue with juicy behaviour and custom flow control.\n\n  Inspired by creationix's [stack](https://www.npmjs.org/package/stack)\n  and jessetane's [queue](https://www.npmjs.org/package/queue)\n\n### General idea\n\nOn mind:\n\nGet an Array subClass out of the `module` after which one can add flow control.\n\n * See `./lib/ArraySubClass.js` or the awesome [kangax post](http://perfectionkills.com/how-ecmascript-5-still-does-not-allow-to-subclass-an-array/) on how to do that.\n\nHave the thing inherit from EventEmitter so one can plug flow control on the known array methods.\n\nNiceness:\n\n  * One should be able to switch the events on and off.\n  * set and get methods to store simple data between layers of the stack.\n\nDefaults:\n\n  * For iterative methods such as `forEach`, events are emitted. See below example for\n  more information on this.\n\n\u003cb\u003eNote\u003c/b\u003e: right you can push everything to the stack. In the future\nthat might change.\n\n### Usage\n\n As an example, lets make a middleware that will measure the time of a request.\n\n```js\nvar http = require('http');\nvar Stack = require('evented-stack'); // Array subClass - EventEmitter\nvar stack = new Stack();\n\n// Elements of the stack\nstack.push(function stackFn1(req, res){\n\n    stack.set('request time', new Date())\n    res.write('There is no dark side of the Moon.')\n\n    return 'Layer 1!';\n\n  }).push(function stackFn2(req, res){\n\n    res.write('\\nAs a matter of fact ')\n    return 'Layer 2!';\n\n  })\n\n// Events\nstack.once('start', function onStart(req, res){ // Once call back\n\n    console.log('onStart: Next time I won\\'t be here')\n\n  }).on('next', function onNext(req, res){\n\n    console.log('onNext: In between layers of the stack')\n\n  }).on('end', function onEnd(req, res){\n\n    console.log('onEnd: finished!')\n    var time = ( new Date() - stack.get('request time') ).toString();\n\n    res.write('it\\'s all dark.');\n    res.write('\\n\\n');\n    res.end('The request took ' + time + ' ms');\n  })\n\n```\n\nAt this point the stack is\n```js\nconsole.log(stack)\n [ [Function: stackFn1],\n  [Function: stackFn2] ]\nconsole.log(stack._events)\n { start: { [Function: g] listener: [Function: onStart] },\n    next: [Function: onNext],\n     end: [Function: onEnd] }\n```\n\nNow we can hook it up to a http.Server\n```js\nvar Server = http.createServer(function(req, res){\n\n  // We can choose to keep events quiet\n    stack.silent = true;\n  // Or listen on demand\n    stack.silent = false;\n\n  // We could use stack.forEach but we'll use the build-in method #run\n  // is like [].forEach but fires 3 events: `start`, `next` and `end`\n  // spec: stack.run(stackArgs [,callback(lasRet, index, allReturns)])\n  stack.run(req, res, function(lastReturn, index, returns){\n    console.log('\\nstack[' + index-1 + '] returned ', lastReturn, '\\n');\n  })\n})\n\nServer.listen(3000, function(){\n  console.log('Server running on port '+3000);\n})\n```\n\n### API\n\nAt this point the package is still on flux. Right know you can expect, `Array`\nand `EventEmitter` like api.\n\nIf you are curious look at `./lib/Stack.js`. In any case this might change\n\n### License\n MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fevented-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fevented-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fevented-stack/lists"}