The npm package @soda/get-current-script has infrequent releases. It had 1 release in March 2020 (version 1.0.0) and 2 releases in June 2020 (versions 1.0.1 and 1.0.2). Since then, there have been no releases for over 5 years, from July 2020 to September 2025.
@soda/get-current-script is a tiny utility providing a reliable way to retrieve the currently executing <script> element in a web browser. This solves a common problem when your script is loaded asynchronously or via a module bundler, as document.currentScript isn't always available. It avoids relying on unpredictable DOM traversal or global variable inspection, offering a consistent method for accessing the script that initiated the current JavaScript execution context. This is particularly useful for component libraries or scripts that need to dynamically determine their own URL or attributes.
@soda/get-current-script npm package downloads show a generally upward trend from March 2024 to August 2025, peaking in June 2025. However, downloads for September 2025 are significantly lower, likely due to the month being incomplete.