Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@odms/streamutils

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@odms/streamutils - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

dist/jq.d.ts

5

dist/http.d.ts

@@ -15,3 +15,8 @@ /// <reference types="node" />

fetch: () => Transform;
/**
* Transform the input stream items of type `Response` using `.json()`.
*
*/
json: () => Transform;
};
//# sourceMappingURL=http.d.ts.map

@@ -26,2 +26,5 @@ import { Transform } from "node:stream";

});
if (!response.ok) {
throw `${response.url} ${response.status} ${response.statusText}`;
}
}

@@ -34,2 +37,12 @@ catch (err) {

}),
/**
* Transform the input stream items of type `Response` using `.json()`.
*
*/
json: () => new Transform({
objectMode: true,
async transform(response, _, callback) {
callback(null, await response.json());
},
}),
};

4

dist/index.d.ts
export * from "./http";
export * from "./jq";
export * from "./json";
export * from "./limit";
export * from "./props";
export * from "./split";
export * from "./text";
export * from "./throttle";
export * from "./toString";
//# sourceMappingURL=index.d.ts.map
export * from "./http";
export * from "./jq";
export * from "./json";
export * from "./limit";
export * from "./props";
export * from "./split";
export * from "./text";
export * from "./throttle";
export * from "./toString";
{
"name": "@odms/streamutils",
"version": "0.1.5",
"version": "0.2.0",
"author": "Jakob Hohlfeld <jakob.hohlfeld@netronaut.de>",

@@ -33,3 +33,4 @@ "repository": {

"test": "bun test src",
"test:coverage": "bun run test --coverage"
"test:coverage": "bun run test --coverage",
"postinstall": "bunx patch-package"
},

@@ -43,3 +44,6 @@ "devDependencies": {

"typescript": "^5.4.5"
},
"dependencies": {
"node-jq": "^4.3.1"
}
}
![Bun Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fopen-dms%2Fodms-streamutils%2Fmain%2Fpackage.json&query=%24.engines.bun&logo=bun&logoColor=%23f9f1e1&label=Bun&color=%23f9f1e1)
![Typescript Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fopen-dms%2Fodms-streamutils%2Fmain%2Fpackage.json&query=%24.devDependencies.typescript&label=Typescript)
![CodeQL](https://github.com/open-dms/odms-streamutils/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)
![Coverage](https://open-dms.github.io/odms-streamutils/coverage.svg)

@@ -73,4 +74,25 @@

# Documentation
## jq
Transform the stream using `jq`.
```ts
import { jq } from "@odms/streamutils";
pipeline(process.stdin, jq(".filter[].items"), process.out);
```
Thanks to [node-js](https://www.npmjs.com/package/node-jq). For filter syntax, refer to the [jq manual](https://jqlang.github.io/jq/).
**Parameters**
- filter: string
filter used to work on the json
example: `.data[] | {id,name}`
---
<center>Proudly developing with <a href="https://bun.sh/"><img alt="Bun typescript runtime" src="https://bun.sh/logo-square.png" height="24px" style="vertical-align: bottom;" /> Bun</a></center>

@@ -30,2 +30,5 @@ import { Transform } from "node:stream";

});
if (!response.ok) {
throw `${response.url} ${response.status} ${response.statusText}`;
}
} catch (err) {

@@ -38,2 +41,14 @@ error = err instanceof Error ? err : new Error(String(err));

}),
/**
* Transform the input stream items of type `Response` using `.json()`.
*
*/
json: () =>
new Transform({
objectMode: true,
async transform(response, _, callback) {
callback(null, await response.json());
},
}),
};
export * from "./http";
export * from "./jq";
export * from "./json";
export * from "./limit";
export * from "./props";
export * from "./split";
export * from "./text";
export * from "./throttle";
export * from "./toString";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc