{"id":19475533,"url":"https://github.com/artdecocode/clean-stack","last_synced_at":"2025-06-29T17:03:46.668Z","repository":{"id":135404264,"uuid":"148578536","full_name":"artdecocode/clean-stack","owner":"artdecocode","description":"A utility to remove internal Node.js lines and specific modules from error stacks.","archived":false,"fork":false,"pushed_at":"2019-04-10T10:50:17.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T15:52:14.038Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artdecocode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-13T03:45:49.000Z","updated_at":"2019-04-10T10:50:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"40f1bf74-9736-42bf-aa96-28f9f588dbcd","html_url":"https://github.com/artdecocode/clean-stack","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/artdecocode/clean-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fclean-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fclean-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fclean-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fclean-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artdecocode","download_url":"https://codeload.github.com/artdecocode/clean-stack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fclean-stack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262632323,"owners_count":23340213,"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-10T19:33:27.313Z","updated_at":"2025-06-29T17:03:46.645Z","avatar_url":"https://github.com/artdecocode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @artdeco/clean-stack\n\n[![npm version](https://badge.fury.io/js/%40artdeco%2Fclean-stack.svg)](https://npmjs.org/package/@artdeco/clean-stack)\n\n`@artdeco/clean-stack` is a fork of clean-stack to remove internal Node.js lines from error stacks, as well as lines from specific modules.\n\n```sh\nyarn add -E @artdeco/clean-stack\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`cleanStack(stack: string, options?: Config)`](#cleanstackstack-stringoptions-config-void)\n  * [`Config`](#type-config)\n- [Copyright](#copyright)\n\n## API\n\nThe package is available by importing its default function:\n\n```js\nimport cleanStack from '@artdeco/clean-stack'\n```\n\n## `cleanStack(`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`stack: string,`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`options?: Config,`\u003cbr/\u003e`): void`\n\n__\u003ca name=\"type-config\"\u003e`Config`\u003c/a\u003e__: Options for the program.\n\n|     Name      |         Type          |                          Description                          |    Default    |\n| ------------- | --------------------- | ------------------------------------------------------------- | ------------- |\n| pretty        | _boolean_             | Replace the absolute path to the home directory with the `~`. | `false`       |\n| ignoreModules | _Array\u0026lt;string\u0026gt;_ | Which modules to ignore in the path.                          | `['pirates']` |\n\nRemove unuseful internal _Node.JS_ lines from the error stack. Any other modules to ignore can be passed in the `ignoreModules` option.\n\n```js\n/* yarn example/ */\nimport cleanStack from '@artdeco/clean-stack'\n\nconst err = `\nError: test\n    at Object.\u003canonymous\u003e (/Users/zavr/adc/clean-stack/i2.js:1:69)\n    at Module._compile (module.js:652:30)\n    at Module._compile (/Users/zavr/adc/clean-stack/node_modules/pirates/lib/index.js:83:24)\n    at Module._extensions..js (module.js:663:10)\n    at Object.newLoader [as .js] (/Users/zavr/adc/clean-stack/node_modules/pirates/lib/index.js:88:7)\n    at Module.load (module.js:565:32)\n    at tryModuleLoad (module.js:505:12)\n    at Function.Module._load (module.js:497:3)\n    at Module.require (module.js:596:17)\n    at require (internal/module.js:11:18)\n`.trim()\n\nconst res = cleanStack(err)\n```\n\n```\nError: test\n    at Object.\u003canonymous\u003e (/Users/zavr/adc/clean-stack/i2.js:1:69)\n```\n\n## Copyright\n\n(c) [Art Deco][1] 2019\n\n[1]: https://artd.eco\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Fclean-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartdecocode%2Fclean-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Fclean-stack/lists"}