open-index/open-npm huggingface dataset:
npm package: @sv-westbridge-orebro/image-renderer-custom
Description: This package is for handeling the most common use cases with the interface [ImageRenderer](https://developer.sitevision.se/webdav/files/apidocs/senselogic/sitevision/api/render/ImageRenderer.html).
Latest version: 1.0.4

## This is a Sitevision package for handeling ImageRenderer

This package is for handeling the most common use cases with the interface [ImageRenderer](https://developer.sitevision.se/webdav/files/apidocs/senselogic/sitevision/api/render/ImageRenderer.html). 

> **imageNode**  Sitevision page node
> **imageAlt** alt text
> **imageSizeObj** the return value from **getImageSize**
```
export function renderImageFromNode(imageNode, imageAlt, imageSizeObj) {
}
```
> returns a image HTML element.

> Insert "small", "medium" or "large" in the input parameter **imageSize**
```
export function getImageSize(imageSize) {
}
```
> returns a **imageSize** which should be used in the **renderImageFromNode()** method.
npm package: @sv-westbridge-orebro/link-renderer-custom
Description: This package is for handeling the most common use cases with the interface [LinkRenderer](https://developer.sitevision.se/webdav/files/apidocs/senselogic/sitevision/api/render/LinkRenderer.html).
Latest version: 1.0.3

## This is a Sitevision package for handeling LinkRenderer

This package is for handeling the most common use cases with the interface [LinkRenderer](https://developer.sitevision.se/webdav/files/apidocs/senselogic/sitevision/api/render/LinkRenderer.html). 


> **pageNodee**  Sitevision page node
> **text** text of the html return element
```
export function renderLinkFromNode(pageNode, text) {
}
```
> returns a image HTML Link element.
npm package: @sv-westbridge-orebro/sv-functions
Description: This is a Sitevision package for handeling Westbridge standard functions
Latest version: 1.0.7

# Sitevision functions
This is a Sitevision package for handeling Westbridge standard functions

## ImageRenderer
```js
/**
 * @param {items} Array
 * @param {maxItems} number
 * @returns array 
*/
function getImageSize(imageSize)
```

```js
/**
 * @param {imageNode} Node
 * @param {imageAlt} string
 * @param {imageSizeObj} number
 * @returns HTML image element 
*/
function renderImageFromNode(imageNode, imageAlt, imageSizeObj)
```

## LinkRenderer
```js
/**
 * @param {pageNode} Node
 * @param {text} string
 * @returns HTML link element 
*/
function renderLinkFromNode(pageNode, text)
```

## Arrays
```js
/**
 * @param {items} Array
 * @returns array with the newest arrays first
*/
function sortArraysOnDate(items)
```

```js
/**
 * @param {items} Array
 * @param {maxItems} number amout of arrays to be returned af function exectution
 * @returns array 
*/
function getNumberOfArrays(items, maxitems)
```
npm package: @sv2dev/multipart-stream
Description: A utility to process multipart/form-data and multipart/mixed bodies.
Latest version: 0.2.0

# @sv2dev/multipart-stream

A utility to process multipart/form-data and multipart/mixed bodies.

[![bundle size](https://badgen.net/bundlephobia/minzip/@sv2dev/multipart-stream)](https://bundlephobia.com/package/@sv2dev/multipart-stream)

## Usage

```ts
import { streamParts, iterableToStream } from "@sv2dev/multipart-stream";

for await (const part of streamParts(responseOrRequest)) {
  if (part.type === "application/json") {
    console.log(await part.json());
  } else if (part.type === "text/plain") {
    console.log(await part.text());
  } else if (part.filename) {
    // Example for bun:
    const file = Bun.file(part.filename);
    const writer = file.writer();
    for await (const chunk of part) {
      await writer.write(chunk);
    }
    await writer.close();
  }
}
```

The `streamParts()` function returns an `AsyncIterable<Part>`. The `Part` class
is similar to a `Blob`.

The streaming is designed to iterate over the parts and their bodies as they
are received. If you don't process the body of a part while streaming, it
will be skipped.

For example, if you use the `Array.fromAsync()` function to collect the parts,
the body of each part will be neglected:

```ts
const [firstPart] = await Array.fromAsync(streamParts(responseOrRequest));

console.log(firstPart.type); // "application/json"
console.log(await firstPart.json()); // ERROR: The body is empty
```