You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
31
47.62%
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)  =>

        string

    applySourceMaps(x, mapFn)  =>

      Promise<string>

# clearAllCaches() src/util.ts#L5

    clearAllCaches()  =>

      void

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

    # fn(id, rest)

      # id

        string

      # rest

      fn(id, rest)  =>

        Promise<T>

    createDeferredCache<T, U>(fn)  =>

      # (key, args)

        # key

          string

        # args

        (key, args)  =>

          Promise<T>

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

    # input

      string | Request

    # init

      Partial<FetchInit>

    fetch(input, init)  =>

      Promise<Response>

# 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)  =>

      Promise<undefined | RawSourceMap>

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

    # formatter

      any

    # args

      any []

    log(formatter, args)  =>

      void

# 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