MCPcopy Create free account
hub / github.com/Stuk/jszip / JSZipObject

Interface JSZipObject

index.d.ts:74–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 type OnUpdateCallback = (metadata: JSZipMetadata) => void;
73
74 interface JSZipObject {
75 name: string;
76 /**
77 * Present for files loadded with `loadAsync`. May contain ".." path components that could
78 * result in a zip-slip attack. See https://snyk.io/research/zip-slip-vulnerability
79 */
80 unsafeOriginalName?: string;
81 dir: boolean;
82 date: Date;
83 comment: string;
84 /** The UNIX permissions of the file, if any. */
85 unixPermissions: number | string | null;
86 /** The UNIX permissions of the file, if any. */
87 dosPermissions: number | null;
88 options: JSZipObjectOptions;
89
90 /**
91 * Prepare the content in the asked type.
92 * @param type the type of the result.
93 * @param onUpdate a function to call on each internal update.
94 * @return Promise the promise of the result.
95 */
96 async<T extends OutputType>(type: T, onUpdate?: OnUpdateCallback): Promise<OutputByType[T]>;
97 nodeStream(type?: 'nodebuffer', onUpdate?: OnUpdateCallback): NodeJS.ReadableStream;
98 }
99
100 interface JSZipFileOptions {
101 /** Set to `true` if the data is `base64` encoded. For example image data from a `<canvas>` element. Plain text and HTML do not need this option. */

Callers 9

fetch_api.jsFile · 0.80
jszip_utils.jsFile · 0.80
test-utils.jsFile · 0.80
delete.jsFile · 0.80
load.jsFile · 0.80
external.jsFile · 0.80
assertUnixPermissionsFunction · 0.80
assertDosPermissionsFunction · 0.80
stream.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected