open-index/open-npm huggingface dataset:
npm package: @swimburger/isomorphic-streams
Description: Isomorphic WHATWG Streams API package for browser, Node.js, and other runtimes. Forked from https://github.com/ksm2/isomorphic-streams
Author: Niels Swimberghe
Latest version: 1.1.1

This is a fork of https://github.com/ksm2/isomorphic-streams

---

# isomorphic-streams

[![Build](https://github.com/Swimburger/isomorphic-streams/actions/workflows/ci.yml/badge.svg)](https://github.com/Swimburger/isomorphic-streams/actions/workflows/node.js.yml)
[![NPM version](https://img.shields.io/npm/v/%40swimburger/isomorphic-streams)](https://www.npmjs.com/package/@swimburger/isomorphic-streams)
[![license](https://img.shields.io/github/license/Swimburger/isomorphic-streams)](https://raw.githubusercontent.com/Swimburger/isomorphic-streams/main/LICENSE)

> Isomorphic [WHATWG Streams API] package for browser, Node.js, and other runtimes.

This package has

- **zero dependencies**
- provides **TypeScript typings**
- supports `ReadableStream`, `WritableStream` and `TransformStream`

## Table of Contents

- [isomorphic-streams](#isomorphic-streams)
  - [Table of Contents](#table-of-contents)
  - [Install](#install)
  - [Usage](#usage)
  - [Contributing](#contributing)
  - [License](#license)

## Install

Use either

    yarn add isomorphic-streams

or

    npm install isomorphic-streams

## Usage

**In the browser:** Instead of using the global `ReadbaleStream` or `window.ReadableStream`, import from this package instead.

**In Node.js:** Instead of importing `node:stream/web` or requiring `stream/web`, import from this package instead.

The following code will work in both Node.js and the browser:

```js
import { ReadableStream } from "isomorphic-streams";

const SECOND = 1000;

const stream = new ReadableStream({
  start(controller) {
    setInterval(() => {
      controller.enqueue(Date.now());
    }, SECOND);
  },
});

for await (const value of stream) {
  console.log(value);
}
```

[More examples][examples]

## Contributing

This project is open to feedback and contributions, please open an issue.

`isomorphic-streams` follows the [Contributor Covenant] Code of Conduct.

## License

MIT © 2023 Niels Swimberghe, see [LICENSE].

[whatwg streams api]: https://streams.spec.whatwg.org/
[license]: https://github.com/Swimburger/isomorphic-streams/blob/main/LICENSE
[contributor covenant]: https://github.com/Swimburger/isomorphic-streams/blob/main/CODE_OF_CONDUCT.md
[examples]: https://github.com/Swimburger/isomorphic-streams/tree/main/examples
npm package: @swimlane/docspa-search
Description: <small>(optional, external)</small>
Latest version: 8.0.4

# DocspaSearchComponent

<small>(optional, external)</small>

This module full text search to DocSPA.

```js { mark="4,16" }
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { DocspaCoreModule } from '@swimlane/docspa-core';
import { DocspaSearchComponent } from '@swimlane/docspa-search';

import { AppComponent } from './app.component';
import { config } from '../docspa.config';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    DocspaCoreModule.forRoot(config),
    DocspaSearchComponent
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

## Usage

Custom element: `<md-search>`  

Used to include full-text search.

```markdown { playground }
<md-search summary="SUMMARY"></md-search>
```
npm package: @swimlane/docspa-stackblitz
Description: <small>(optional, external)</small>
Latest version: 8.0.3

## DocspaStackblitzModule

<small>(optional, external)</small>

This module allows embedding StackBlitz projects within markdown using a `embed-stackblitz` custom element and the [[stackblitz]] shortcode.

```js { mark="3,15" }
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { DocspaCoreModule } from '@swimlane/docspa-core';
import { DocspaStackblitzModule } from '@swimlane/docspa-stackblitz';

import { AppComponent } from './app.component';
import { config } from '../docspa.config';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    DocspaCoreModule.forRoot(config),
    DocspaStackblitzModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

The `embed-stackblitz` custom element accepts a [StackBlitz project payload](https://stackblitz.com/docs#project-payload) as the `project` input.

```markdown { playground }
<embed-stackblitz
  title='Embeded StackBlitz Project<br />DocSPA'
  project='{"template": "javascript", "files": {"index.js": "console.log(123)", "index.html": "Hello World"} }'>
</embed-stackblitz>
```

or a path to a project payload (`JSON` file) in the documentation local files (relative to the document root folder):

```markdown { playground }
[[stackblitz title="Local StackBlitz Project<br />DocSPA" project-path="examples/folder/stackblitz" ]]
```

i> When providing a payload path, if the `files` property of the payload contains an array, this is treated as an array of relative paths from which the file content will be loaded.

You may also supply a `project-id` to to load an existing StackBlitz project:

```markdown { playground }
<embed-stackblitz
  title='Existing StackBlitz Project<br />DocSPA'
  project-id="sdk-create-project">
</embed-stackblitz>
```

If a both `project-id` and either a `project-path` or `project` input are provided, the files listed in the local project's files are treated as a a patch to the existing StackBlitz project.

```markdown { playground }
<embed-stackblitz
  title='Existing StackBlitz Project with local changes<br />DocSPA'
  project-id="sdk-create-project"
  project-path="examples/folder/stackblitz">
</embed-stackblitz>
```
npm package: @swimlane/dom-diff
Description: diffing chunks of dom or HTML for semantic equality
Latest version: 1.0.1

# @swimlane/dom-diff

This library acts as a base project for diffing chunks of dom or HTML for semantic equality.

Used in:
- [@swimlane/cy-dom-diff](https://github.com/swimlane/cy-dom-diff)

## API

### `getDiffableHTML`

Takes a snippet of HTML and returns a semantically similar diffable HTML snippet.

```js
import { getDiffableHTML } from '@swimlane/dom-diff';

const h = `
<head></head>
<div z="1" a="2" x>
  <h1 z="3">Hello</h1>
  <h2>World</h2>
  <svg>SVG ignored</svg>
  <script>scripts also ignored</script>
  <style>styles also ignored</style>
  <!-- comments ignored too -->
</div>`;

getDiffableHTML(h, {
  ignoreAttributes: [{ tags: ['h1'], attributes: ['z'] }]
});

// <div
//   a="2"
//   x
//   z="1"
// >
//   <h1>
//     Hello
//   </h1>
//   <h2>
//     World
//   </h2>
// </div>
```

### `dom`

Template tag that takes a snippet of HTML and returns a regular expression.

> Follows rules defined in https://github.com/Hypercubed/lit-regex

```js
import { dom } from '@swimlane/dom-diff';

dom`<h1>Hello ${/[\w-]+/}</h1>`;

// /^<h1>\n  Hello [\w-]+\n<\/h1>$/
```

### `diff`

Takes a regular expression generated by `dom` and a string generated from `getDiffableHTML` returning a representation of the difference.

```js
import { diff, dom, getDiffableHTML } from '@swimlane/dom-diff';

const h = getDiffableHTML('<div>Hello 123</div>');
const r = dom`<div>Hello ${/[a-zA-Z]+/}</div>`;

diff(r, h);

//   <div>
//  -  Hello \${/[a-zA-Z]+/}
//  +  Hello 123
//   </div>
```
# Release

- Checkout main (`git checkout main`)
- Pull from origin (`git pull origin main`)
- Examine `CHANGELOG.md` to determine next version (`X.Y.Z`)
- Run np (`npm run np`) and follow the prompts

# License

Distributed under the MIT License. See LICENSE for more information.

# Credits

`@swimlane/dom-diff` is a [Swimlane](http://swimlane.com) open-source project; we
believe in giving back to the open-source community by sharing some of the
projects we build.

[Swimlane](http://www.swimlane.com) is an automated cyber security operations and incident response
platform that enables cyber security teams to leverage threat intelligence,
speed up incident response and automate security operations.
npm package: @swimlane/eslint-config
Description: Linting rules for Javascript
Author: Swimlane
Latest version: 2.0.0

# Swimlane Eslint Rules

Rules for [eslint](https://github.com/eslint/eslint) used in Swimlane's Javascript (etc) development.

## Javascript (es6)

Install:

```sh
npm install --save-dev eslint @swimlane/eslint-config eslint-plugin-security
```

Create an .eslintrc.yml file with the following:

```yaml
env:
  browser: true
  commonjs: true
  es2021: true
extends:
  - '@swimlane'
parserOptions:
  ecmaVersion: 12
```

## TypeScript

Install:

```sh
npm install --save-dev eslint @swimlane/eslint-config eslint-plugin-security
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
```

Create an `.eslintrc.yml` file with the following:

```yaml
env:
  browser: true
  es2021: true
  node: true
extends:
  - '@swimlane/eslint-config/typescript'
parserOptions:
  ecmaVersion: 12
  sourceType: module
```

## Prettier

If using prettier (for example [@swimlane/prettier-config-swimlane](https://github.com/swimlane/prettier-config-swimlane)) you should follow instructions in the [eslint-config-prettier readme](https://github.com/prettier/eslint-config-prettier#readme) to install and setup `eslint-config-prettier`. For example for es6 config your
`.eslintrc.yml` file will be:

```yaml
env:
  browser: true
  commonjs: true
  es2021: true
extends:
  - '@swimlane'
  - 'prettier'
parserOptions:
  ecmaVersion: 12
```

## Versioning Policy

- Major (new linting errors)

  - A new rule is added
  - An existing rule is made more strict
  - A new plugin is added to an existing config
  - A existing plugin is updated to be more strict

- Minor (same or fewer linting errors)

  - A rule is removed
  - An existing rules is made less strict
  - Adding a new configuration
  - A existing plugin is updated to be less strict

- Patch (non-user-facing changes)

  - Changes to documentation
  - Fixes for build or publication
  - Modifying tests

## Credits

`@swimlane/eslint-config` is a [Swimlane](http://swimlane.com) open-source project; we
believe in giving back to the open-source community by sharing some of the
projects we build.

[Swimlane](http://www.swimlane.com) is an automated cyber security operations and incident response
platform that enables cyber security teams to leverage threat intelligence,
speed up incident response and automate security operations.
npm package: @swimlane/ng2-file-upload
Description: This is a fork of https://github.com/valor-software/ng2-file-upload that is compatible with Ivy and angular 9. It is not under maintenance, so please do not submit pull requests.
Author: Vyacheslav Chub
Latest version: 1.2.0

This is a fork of https://github.com/valor-software/ng2-file-upload that is compatible with Ivy and angular 9. It is not under maintenance, so please do not submit pull requests.