This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "zodios-test", | |
"version": "1.0.0", | |
"license": "ISC", | |
"packageManager": "^[email protected]", | |
"dependencies": { | |
"@types/express": "^4.17.15", | |
"@zodios/core": "^10.7.1", | |
"@zodios/express": "^10.4.4", | |
"axios": "^1.2.2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module "javascript-state-machine" { | |
import { CamelCase } from "type-fest"; | |
namespace StateMachine { | |
// Does not use a class type because it does not allow to produce instances | |
// whose members depend on the generic type parameters, e.g. using type | |
// union as we do here. | |
type Constructor = { | |
new < | |
TransitionName extends string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Observable } from 'rxjs'; | |
// Adapted from https://github.com/Reactive-Extensions/rx-node/blob/87589c07be626c32c842bdafa782fca5924e749c/index.js#L52 | |
export default function fromStream(stream, finishEventName = 'end', dataEventName = 'data') { | |
stream.pause(); | |
return new Observable((observer) => { | |
function dataHandler(data) { | |
observer.next(data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fork of ddply's summarize that 'flattens' named columns | |
flat.summarize <- function (data, ...) { | |
stopifnot(is.data.frame(data) || is.list(data) || is.environment(data)) | |
cols <- as.list(substitute(list(...))[-1]) | |
if (is.null(names(cols))) { | |
missing_names <- rep(TRUE, length(cols)) | |
} | |
else { | |
missing_names <- names(cols) == "" | |
} |