• Version 2.8.2
  • Published
  • 246 kB
  • 1 dependency
  • MIT license


npm i rollup-pluginutils
yarn add rollup-pluginutils
pnpm add rollup-pluginutils


Functionality commonly needed by Rollup plugins



variable addExtension

const addExtension: AddExtension;

    variable attachScopes

    const attachScopes: AttachScopes;

      variable createFilter

      const createFilter: CreateFilter;

        variable dataToEsm

        const dataToEsm: DataToEsm;

          variable extractAssignedNames

          const extractAssignedNames: ExtractAssignedNames;

            variable makeLegalIdentifier

            const makeLegalIdentifier: MakeLegalIdentifier;


              interface AttachedScope

              interface AttachedScope {}

                property declarations

                declarations: { [key: string]: boolean };

                  property isBlockScope

                  isBlockScope: boolean;

                    property parent

                    parent?: AttachedScope;

                      method addDeclaration

                      addDeclaration: (
                      node: Node,
                      isBlockDeclaration: boolean,
                      isVar: boolean
                      ) => void;

                        method contains

                        contains: (name: string) => boolean;

                          interface DataToEsmOptions

                          interface DataToEsmOptions {}

                            property compact

                            compact?: boolean;

                              property indent

                              indent?: string;

                                property namedExports

                                namedExports?: boolean;

                                  property objectShorthand

                                  objectShorthand?: boolean;

                                    property preferConst

                                    preferConst?: boolean;

                                      Type Aliases

                                      type AddExtension

                                      type AddExtension = (filename: string, ext?: string) => string;

                                        type AttachScopes

                                        type AttachScopes = (ast: Node, propertyName?: string) => AttachedScope;

                                          type CreateFilter

                                          type CreateFilter = (
                                          include?: Array<string | RegExp> | string | RegExp | null,
                                          exclude?: Array<string | RegExp> | string | RegExp | null,
                                          options?: { resolve?: string | false | null }
                                          ) => (id: string | any) => boolean;

                                            type DataToEsm

                                            type DataToEsm = (data: any, options?: DataToEsmOptions) => string;

                                              type ExtractAssignedNames

                                              type ExtractAssignedNames = (param: Node) => Array<string>;

                                                type MakeLegalIdentifier

                                                type MakeLegalIdentifier = (str: string) => string;

                                                  Package Files (1)

                                                  Dependencies (1)

                                                  Dev Dependencies (18)

                                                  Peer Dependencies (0)

                                                  No peer dependencies.


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

                                                  You may also use to create a custom badge linking to

                                                  • Markdown
                                                  • HTML
                                                    <a href=""><img src="" alt=""></a>