• Version 6.4.22
  • Published
  • 108 kB
  • 10 dependencies
  • MIT license


npm i @storybook/source-loader
yarn add @storybook/source-loader
pnpm add @storybook/source-loader


Source loader



function extractSource

extractSource: (location: SourceBlock, lines: string[]) => string | null;
  • given a location, extract the text from the full source


interface LocationsMap

interface LocationsMap {}

    index signature

    [key: string]: SourceBlock;

      interface SourceBlock

      interface SourceBlock {}

        property endBody

        endBody: SourceLoc;

          property endLoc

          endLoc: SourceLoc;

            property startBody

            startBody: SourceLoc;

              property startLoc

              startLoc: SourceLoc;

                interface SourceLoc

                interface SourceLoc {}

                  property col

                  col: number;

                    property line

                    line: number;

                      Package Files (3)

                      Dependencies (10)

                      Dev Dependencies (0)

                      No dev dependencies.

                      Peer Dependencies (2)


                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/source-loader.

                      • Markdown
                      • HTML
                        <a href="https://www.jsdocs.io/package/@storybook/source-loader"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>