Socket
Socket
Sign inDemoInstall

apply-sourcemaps

Package Overview
Dependencies
41
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
119
decreased by-11.85%
Maintainers
1
Install size
4.86 MB
Created
Weekly downloads
 

Readme

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

        Last updated on 09 Dec 2023

        Did you know?

        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

        Stay in touch

        Get open source security insights delivered straight into your inbox.


        • Terms
        • Privacy
        • Security

        Made with ⚡️ by Socket Inc