Gathering detailed insights and metrics for @types/insert-module-globals
Gathering detailed insights and metrics for @types/insert-module-globals
Gathering detailed insights and metrics for @types/insert-module-globals
Gathering detailed insights and metrics for @types/insert-module-globals
The repository for high quality TypeScript type definitions.
npm install @types/insert-module-globals
Typescript
Module System
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,024 Stars
89,737 Commits
30,435 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 12, 2025
Latest Version
7.0.5
Package Id
@types/insert-module-globals@7.0.5
Unpacked Size
7.26 kB
Size
2.40 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
npm install --save @types/insert-module-globals
This package contains type definitions for insert-module-globals (https://github.com/browserify/insert-module-globals).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/insert-module-globals.
1/// <reference types="node" /> 2 3import * as stream from "stream"; 4 5export = InsertModuleGlobals; 6 7interface InsertModuleGlobals { 8 /** 9 * Return a transform stream inserter for the filename file that will accept a javascript file as input and 10 * will output the file with a closure around the contents as necessary to define extra builtins. 11 */ 12 (file: string, opts?: InsertModuleGlobals.Options): stream.Transform; 13 14 /** 15 * Defaults 16 */ 17 readonly vars: { 18 process(file: string): string; 19 global(): string; 20 "Buffer.isBuffer"(file: string): string; 21 Buffer(): string; 22 __filename(file: string, basedir: string): string; 23 __dirname(file: string, basedir: string): string; 24 }; 25} 26 27declare const InsertModuleGlobals: InsertModuleGlobals; 28 29declare namespace InsertModuleGlobals { 30 interface Options { 31 /** 32 * When opts.always is true, wrap every file with all the global variables without parsing. 33 * This is handy because parsing the scope can take a long time, so you can prioritize fast builds over saving bytes in the final output. 34 * When opts.always is truthy but not true, avoid parsing but perform a quick test to determine if wrapping should be skipped. 35 */ 36 always?: boolean | undefined; 37 /** 38 * Use opts.vars to override the default inserted variables, or set opts.vars[name] to undefined to not insert a variable which would otherwise be inserted. 39 * 40 * opts.vars properties with a . in their name will be executed instead of the parent object if ONLY that property is used. 41 * For example, "Buffer.isBuffer" will mask "Buffer" only when there is a Buffer.isBuffer() call in a file and no other references to Buffer. 42 */ 43 vars?: VarsOption | undefined; 44 /** 45 * If opts.debug is true, an inline source map will be generated to compensate for the extra lines. 46 */ 47 debug?: boolean | undefined; 48 basedir?: string | undefined; 49 } 50 51 interface VarsOption { 52 [name: string]: InsertFunction | undefined; 53 } 54 55 type InsertFunction = (file: string, basedir: string) => VariableConfig | string; 56 57 interface VariableConfig { 58 id: string; 59 source: string; 60 suffix?: string | undefined; 61 } 62} 63
These definitions were written by Leonard Thieu.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More