MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / toBuffer

Method toBuffer

javascript/selenium-webdriver/io/zip.js:133–138  ·  view source on GitHub ↗

* Returns the compressed data for this archive in a buffer. _This method will * not wait for any outstanding #addFile add * #addDir operations before encoding the archive._ * * @param {string} compression The desired compression. * Must be `STORE` (the default) or

(compression = 'STORE')

Source from the content-addressed store, hash-verified

131 * as a buffer.
132 */
133 toBuffer(compression = 'STORE') {
134 if (compression !== 'STORE' && compression !== 'DEFLATE') {
135 return Promise.reject(new InvalidArgumentError(`compression must be one of {STORE, DEFLATE}, got ${compression}`))
136 }
137 return Promise.resolve(this.z_.generateAsync({ compression, type: 'nodebuffer' }))
138 }
139}
140
141/**

Callers 4

buildProfileFunction · 0.95
installAddonMethod · 0.95
handleFileMethod · 0.95
zip_test.jsFile · 0.80

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected