does-it-fit
Advanced tools
+1
-1
| { | ||
| "name": "does-it-fit", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Determine whether an HTTP endpoint's TCP response fits within minimum constraints", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+39
-18
@@ -21,31 +21,51 @@ # does-it-fit | ||
| ### require('does-it-fit') => (url, opts, cb(err, result)) | ||
| ### `require('does-it-fit') => (url, opts, cb(err, result))` | ||
| #### opts | ||
| #### `opts` | ||
| **constraints**: Array of bytes - index of each matches labels | ||
| Default: `[536, 1024, 14336, 66560]` | ||
| ##### `constraints` | ||
| Array of bytes - index of each matches labels | ||
| Default: `[536, 1024, 14336, 66560]` | ||
| **labels**: Array of labels matching byte windows, | ||
| Default: `['First TCP Segment', 'First Ethernet Packet', 'First TCP Roundtrip', 'First TCP Frame']` | ||
| ##### `labels` | ||
| Array of labels matching byte windows, | ||
| Default: `['First TCP Segment', 'First Ethernet Packet', 'First TCP Roundtrip', 'First TCP Frame']` | ||
| **ssl**: Add SSL overhead (default: true) | ||
| ##### `ssl` | ||
| Add SSL overhead (default: true) | ||
| **gzip**: GZIP the body (default: true) | ||
| ##### `gzip` | ||
| GZIP the body (default: true) | ||
| **sslCost**: Estimated amount of bytes for SSL overhead (default: 40) | ||
| ##### `sslCost` | ||
| Estimated amount of bytes for SSL overhead (default: 40) | ||
| **gzipLevel**: Compression level: 1-9. Defaults to Node's default gzip level | ||
| ##### `gzipLevel` | ||
| Compression level: 1-9. Defaults to Node's default gzip level | ||
| #### result { total, fits, headers, body, emulatedSslSize, emulateGzip, gzipLevel } | ||
| #### `result` | ||
| **total**: Total estimated bytes sent along TCP connection for endpoint | ||
| **fits**: Relevant TCP constraint (First TCP Segment, First Ethernet Packet, First TCP Roundtrip, First TCP Frame or No target TCP constraints) | ||
| **headers**: Size of headers | ||
| **body**: Size of body (after gzipping, if enabled) | ||
| **emulatedSslSize**: Estimated size of SSL overhead (as set by `sslCost`) | ||
| **emulateGzip**: Whether GZIP was emulated (disabled with `noGzip`) | ||
| **gzipLevel**: The compression level applied, only added if `emulateGzip` is `true` | ||
| ##### `total` | ||
| Total estimated bytes sent along TCP connection for endpoint | ||
| ##### `fits` | ||
| Relevant TCP constraint (First TCP Segment, First Ethernet Packet, First TCP Roundtrip, First | ||
| TCP Frame or No target TCP constraints) | ||
| ##### `headers` | ||
| Size of headers | ||
| ##### `body` | ||
| Size of body (after gzipping, if enabled) | ||
| ##### `emulatedSslSize` | ||
| Estimated size of SSL overhead (as set by `sslCost`) | ||
| ##### `emulateGzip` | ||
| Whether GZIP was emulated (disabled with `noGzip`) | ||
| ##### `gzipLevel` | ||
| The compression level applied, only added if `emulateGzip` is `true` | ||
| ## CLI | ||
@@ -89,2 +109,3 @@ | ||
| ## Acknowledgements | ||
| * [Yoshua Wuyts](https://github.com/yoshuawuyts) | ||
@@ -91,0 +112,0 @@ * Sponsored by [nearForm](http://nearform.com) |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
114
22.58%12695
-0.35%