{"library":"get-source","type":"library","category":null,"description":"`get-source` is a JavaScript utility designed to fetch and resolve source-mapped source files in both Node.js and browser environments. Currently stable at version 2.0.12, it provides both synchronous and asynchronous APIs to read file contents and traverse sourcemap chains. Its core differentiating features include comprehensive sourcemap support—handling external, embedded, inline links, and long chains—and a built-in cache for performance. It's particularly useful for enhancing call stacks, advanced logging, and creating error display components in front-end development, as demonstrated by its use in libraries like `StackTracey` and `ololog`. The library ships with TypeScript types, making it suitable for modern JavaScript and TypeScript projects. While the synchronous API is designed not to throw errors, the asynchronous API utilizes standard Promise-based error handling.","language":"javascript","status":"active","version":"2.0.12","tags":["javascript","sources","sourcemap","read source","cached sources","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install get-source","imports":["import getSource from 'get-source'","import getSource from 'get-source'; const asyncSource = getSource.async;","import getSource from 'get-source'; getSource.resetCache(); getSource.async.resetCache();"]},{"cmd":"yarn add get-source","imports":[]},{"cmd":"pnpm add get-source","imports":[]}],"homepage":null,"github":"https://github.com/xpl/get-source","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/get-source","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/get-source/compatibility"}}