npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cuties/https

v1.1.6

Published

Cutie extension for https module in Node.

Downloads

24

Readme

cutie-https

NPM Version Build Status codecov

Cutie extension for https module in Node. It's based on the Async Tree Pattern.

Examples

You can find examples of using this library in the test directory.

Install

npm install @cuties/https

Run test

npm test

Run build

npm run build

Usage

const {
  // Needed async objects here from the table below
} = require('@cuties/https');

For more information about parameters in the async objects visit docs of Node for https module.

agent

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | CreatedHttpsAgent | new Agent | options | agent | | CreatedHttpsAgentConnection | agent.createConnection | agent, options | stream/socket | | DestroyedAgent | agent.destroy | agent | agent | | KeptSocketAliveOfAgent | agent.keepSocketAlive | agent, socket | socket | | MaxFreeSocketsOfAgent | agent.maxFreeSockets | agent | number | | MaxSocketsOfAgent | agent.maxSockets | agent | number | | NameOfAgent | agent.getName | agent, options | string | | RequestsOfAgent | agent.requests | agent | object | | ReusedSocketOfAgent | agent.reuseSocket | agent, socket | stream/socket | | SocketsOfAgent | agent.sockets | agent | object |

https

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | CreatedHttpsServer | https.createServer | [options][, requestListener(Event with definedBody(request, response))] | server | | HttpsGetRequest | https.get | options[, listener(Event(one time) with definedBody(incomingMessage))] | request | | HttpsRequest | https.request | options[, listener(Event(one time) with definedBody(incomingMessage))] | request | | ResponseBody | response.body, response = {statusCode, headers, body} | response({statusCode, headers, body}) | body as buffer | | ResponseFromHttpsGetRequest | responseFromHttpsGetRequest | options | response({statusCode, headers, body}) | | ResponseFromHttpsRequest | responseFromHttpsRequest | options, requestBody(as string) | response({statusCode, headers, body}) | | ResponseHeaders | response.headers, response = {statusCode, headers, body} | response({statusCode, headers, body}) | object | | ResponseStatusCode | response.statusCode, response = {statusCode, headers, body} | response({statusCode, headers, body}) | number |

incoming-message

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | DestroyedIncomingMessage | message.destroy | message | message | | HeadersOfIncomingMessage | message.headers | message | object | | HttpVersionOfIncomingVersion | message.httpVersion | message | string | | IncomingMessageWithAbortEvent | message.on('abort', event) | message, event(Event with definedBody()) | message | | IncomingMessageWithCloseEvent | message.on('close', event) | message, event(Event with definedBody()) | message | | IncomingMessageWithTimeout | message.setTimeout | message, msecs, callback | message | | MethodOfIncomingMessage | message.method | message | string | | RawHeadersOfIncomingMessage | message.rawHeaders | message | string[] | | RawTrailersOfIncomingMessage | message.rawTrailers | message | string[] | | SocketOfIncomingMessage | message.socket | message | socket | | StatusCodeOfIncomingMessage | message.statusCode | message | number | | StatusMessageOfIncomingMessage | message.statusMessage | message | string | | TrailersOfIncomingMessage | message.trailers | message | object | | UrlOfIncomingMessage | message.url | message | string |

options

| Async Object | Async/sync call or Description | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | CreatedOptions | Builds options object: (key1, value1, key2, value2) => {key1: value1, key2: value2} | ...args like (key1, value1, key2, value2) | object | | OptionsWithAgent | options.agent = agent | options, agent | object |

request

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | AbortedReqest | request.abort | request | request | | EndedReqest | request.end | request, data, encoding | request | | RequestAbortedTime | request.aborted | request | number | | RequestHeader | request.header | request, name | string | | RequestWithAbortEvent | request.on('abort', event) | request, event(Event with definedBody()) | request | | RequestWithConnectEvent | request.on('connect', event) |request, event(Event with definedBody(incomingMessage, socket, head)) | request | | RequestWithContinueEvent | request.on('continue', event) | request, event(Event with definedBody()) | request | | RequestWithDataEvent | request.on('data', event) | request, event(Event with definedBody(chunk)) | request | | RequestWithEndEvent | request.on('end', event) | request, event(Event with definedBody()) | request | | RequestWithErrorEvent | request.on('error', event) | request, event(Event with definedBody(error)) | request | | RequestWithFlushedHeaders | request.flushHeaders | request | request | | RequestWithHeader | request.setHeader | request, name, value | request | | RequestWithNoDelay | request.setNoDelay | request, noDelay | request | | RequestWithRemovedHeader | request.removeHeader | request, name | request | | RequestWithResponseEvent | request.on('response', event) | request, event(Event with definedBody(response)) | request | | RequestWithSocketEvent | request.on('socket', event) | request, event(Event with definedBody(socket)) | request | | RequestWithSockedKeepAlive | request.setSocketKeepAlive | request, enable, initialDelay | request | | RequestWithTimeout | request.setTimeout | request, timeout | request | | RequestWithTimeoutEvent | request.on('timeout', event) | request, event(Event with definedBody()) | request | | RequestWithUpgradeEvent | request.on('upgrade', event) | request, event(Event with definedBody(req, socket, head)) | request | | SocketOfRequest | request.socket | request | socket | | WrittenRequest | request.write | request, chunk, encoding('utf8') | request |

reponse

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | ConnectionOfResponse | response.connection | response | socket | | EndedResponse | response.end | response, data, encoding('utf8') | response | | HasResponseHeader | response.hasHeader | response, name | boolean | | HeaderOfResponse | response.getHeader | response, name | string | | HeadersOfResponse | response.getHeaders | response | object | | IsResponseFinished | response.finished | response | boolean | | ResponseWithAddedTrailers | response.addTrailers | response, headers | response | | ResponseWithCloseEvent | response.on('close', event) | response, event(Event with definedBody()) | response | | ResponseWithFinishEvent | response.on('finish', event) | response, event(Event with definedBody()) | response | | ResponseWithHeader | response.setHeader | response, name, value | response | | ResponseWithHeaders | response.setHeader for every in headers | response, headers(object) | response | | ResponseWithRemovedHeader | response.removeHeader | response, name | response | | ResponseWithStatusCode | response.statusCode | response, statusCode | response | | ResponseWithStatusMessage | response.statusMessage | response, statusMessage | response | | ResponseWithTimeout | response.setTimeout | response, msecs, callback | response | | ResponseWithWrittenHead | response.writeHead | response, statusCode, statusMessage, headers | response | | SendDateOfResponse | response.sendDate | response | boolean | | SocketOfResponse | response.socket | response | socket | | StatusCodeOfResponse | response.statusCode | response | number | | StatusMessageOfResponse | response.statusMessage | response | string | | HaveResponseHeadersSent | response.headersSent | response | boolean | | WrittenContinueResponse | response.writeContinue | response | response | | WrittenResponse | response.write | response, chunk, encoding('utf8') | response |

server

| Async Object | Async/sync call | Parameters(default value/description) | Representation result | | ------------- | ----------------| ---------- | --------------------- | | ClosedServer | server.close | server | server | | IsServerListening | server.listening | server | boolean | | KeepAliveTimeoutOfServer | server.keepAliveTimeout | server | number | | ListeningServer | server.listen | ...args | server | | MaxHeadersCountOfServer | server.maxHeadersCount | server | number | | ServerWithCloseEvent | server.on('close', event) | server, event(Event with definedBody()) || | ServerWithCheckContinueEvent | server.on('checkContinue', event) | server, event(Event with definedBody(req, res)) | server | | ServerWithCheckExpectationEvent | server.on('checkExpectation', event) | server, event(Event with definedBody(req, res)) | server | | ServerWithClientErrorEvent | server.on('clientError', event) | server, event(Event with definedBody(exception, socket)) | server | | ServerWithConnectEvent | server.on('connect', event) | server, event(Event with definedBody(request, socket, head)) | server | | ServerWithConnectionEvent | server.on('connection', event) | server, event(Event with definedBody(socket)) | server | | ServerWithRequestEvent | server.on('request', event) | server, event(Event with definedBody(request, response)) | server | | ServerWithTimeout | server.setTimeout | server, msecs, callback | server | | ServerWithUpgradeEvent | server.on('upgrade', event) | server, event(Event with definedBody(request, socket, head)) | server | | TimeoutOfServer | server.timeout | server | number |