Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apply-sourcemaps

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apply-sourcemaps

Fetch and apply sourcemaps in logs and stack traces originating from the browser or puppeteer.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
81
increased by1.25%
Maintainers
1
Weekly downloads
 
Created
Source

apply-sourcemaps

Fetch and apply sourcemaps in logs and stack traces originating from the browser or puppeteer.

npm i apply-sourcemaps pnpm add apply-sourcemaps yarn add apply-sourcemaps

API

# getRealLocationFromUrlLineCol src/get-real-location-from-line-col.ts#L36
# RealLocation src/get-real-location-from-line-col.ts#L4
# Sources src/fetch-source-map.ts#L10
# applySourceMaps(x, mapFn) src/apply-sourcemaps.ts#L14

    # x

      string

    # mapFn(url)

      # url

        string

      mapFn(url)  =>

      applySourceMaps(x, mapFn)  =>

        Promise

    # clearAllCaches() src/util.ts#L5

      clearAllCaches()  =>

      # createDeferredCache(fn) src/util.ts#L11

        # fn(id, rest)

          # id

            string

          # rest

          fn(id, rest)  =>

            PromiseT

        createDeferredCache<T, U>(fn)  =>

          # (key, args)

            # key

              string

            # args

            (key, args)  =>

              PromiseT

      # fetch(input, init) src/fetch-source-map.ts#L17

        # input

          string | Request

        # init

          Partial<FetchInit>

        fetch(input, init)  =>

          PromiseResponse

      # fetchSourceMap(key, args) src/fetch-source-map.ts#L23

        # key

          string

        # args

          [ ]

        fetchSourceMap(key, args)  =>

      # getCodeFrame(message, { column, line, originalUrl, url }) src/get-code-frame.ts#L4
      # getIt(key, args) src/get-real-location-from-line-col.ts#L13
      # getRealLocationFromUrlLineCol(real) src/get-real-location-from-line-col.ts#L36
      # getSourceMap(url, content) src/get-source-map.ts#L9

        # url

          string

        # content

          string

        getSourceMap(url, content)  =>

          PromiseRawSourceMap

      # log(formatter, args) src/apply-sourcemaps.ts#L5

        # formatter

          any

        # args

          any []

        log(formatter, args)  =>

        # parseUrls(x) src/parse-urls.ts#L5

        Credits

        Contributing

        Fork or edit and submit a PR.

        All contributions are welcome!

        License

        MIT © 2022 stagas

        FAQs

        Package last updated on 09 Dec 2023

        Did you know?

        Socket

        Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

        Install

        Related posts

        SocketSocket SOC 2 Logo

        Product

        • Package Alerts
        • Integrations
        • Docs
        • Pricing
        • FAQ
        • Roadmap
        • Changelog

        Packages

        npm

        Stay in touch

        Get open source security insights delivered straight into your inbox.


        • Terms
        • Privacy
        • Security

        Made with ⚡️ by Socket Inc