{"id":28684915,"url":"https://github.com/node-modules/memory-tripwire","last_synced_at":"2025-06-14T03:07:50.663Z","repository":{"id":29217554,"uuid":"32749186","full_name":"node-modules/memory-tripwire","owner":"node-modules","description":"suicide when memory over the limit","archived":false,"fork":false,"pushed_at":"2022-02-12T03:08:37.000Z","size":7,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-29T20:25:34.565Z","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":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-modules.png","metadata":{"files":{"readme":"README.md","changelog":"History.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":"2015-03-23T17:56:05.000Z","updated_at":"2023-05-11T15:30:01.000Z","dependencies_parsed_at":"2022-07-24T16:17:09.808Z","dependency_job_id":null,"html_url":"https://github.com/node-modules/memory-tripwire","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/node-modules/memory-tripwire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmemory-tripwire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmemory-tripwire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmemory-tripwire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmemory-tripwire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-modules","download_url":"https://codeload.github.com/node-modules/memory-tripwire/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fmemory-tripwire/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259752078,"owners_count":22905972,"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":"2025-06-14T03:07:44.735Z","updated_at":"2025-06-14T03:07:50.656Z","avatar_url":"https://github.com/node-modules.png","language":"JavaScript","readme":"memory-tripwire\n---------------\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![David deps][david-image]][david-url]\n[![node version][node-image]][node-url]\n[![Gittip][gittip-image]][gittip-url]\n\n[npm-image]: https://img.shields.io/npm/v/memory-tripwire.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/memory-tripwire\n[travis-image]: https://img.shields.io/travis/node-modules/memory-tripwire.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/memory-tripwire\n[coveralls-image]: https://img.shields.io/coveralls/node-modules/memory-tripwire.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/node-modules/memory-tripwire?branch=master\n[david-image]: https://img.shields.io/david/node-modules/memory-tripwire.svg?style=flat-square\n[david-url]: https://david-dm.org/node-modules/memory-tripwire\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[gittip-image]: https://img.shields.io/gittip/dead-horse.svg?style=flat-square\n[gittip-url]: https://www.gittip.com/dead-horse/\n\nsuicide when memory over the limit\n\n## Installation\n\n```bash\n$ npm install memory-tripwire\n```\n\n## Usage\n\n```js\nvar tripwire = Tripwire({\n  warning: '20mb',\n  critical: '40mb',\n  interval: '1s',\n  cycle: 3,\n  exitTime: '5s',\n  disconnectTime: '3s'\n});\n\ntripwire.start();\ntripwire.on('bomb', function () {\n  console.log('oops');\n});\n```\n\n### Options\n\n- `warning` - warning memory limit, will be killed after observation\n- `critical` - critical memory limit, will be killed at once if memory is critical\n- `interval` - memory check interval\n- `cycle` - max warning continuously cycle, or will be killed\n- `disconnectTime` - will disconnect after `disconnctTime`\n- `exitTime` - will exit after `exitTime`\n- `exitCode` - will exit with `exitCode`\n\n### [Examples](examples)\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fmemory-tripwire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-modules%2Fmemory-tripwire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fmemory-tripwire/lists"}