open-index/open-npm huggingface dataset:
npm package: @mrbau/adf-core
Description: Fork of @alfresco/adf-core 8.1.1 with custom modifications
Author: Wolfgang Moser. Hyland Software, Inc. and its affiliates
Latest version: 8.1.1-mrbau.0

# Alfresco Core Library

Contains a variety of components, directives and services used throughout ADF

<!-- markdown-toc start - Don't edit this section.  npm run toc to generate it-->

<!-- toc -->

- [Documentation](#documentation)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Storybook](#storybook)
- [License](#license)

<!-- tocstop -->

<!-- markdown-toc end -->

## Documentation

See the [ADF Core](../../docs/README.md#adf-core) section of the [docs index](../../docs/README.md)
for all available documentation on this library.

## Prerequisites

Before you start using this development framework, make sure you have installed all required software and done all the
necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md).

> If you plan using this component with projects generated by Angular CLI, please refer to the following article: [Using ADF with Angular CLI](https://github.com/Alfresco/alfresco-ng2-components/wiki/Angular-CLI)

## Install

```sh
npm install @alfresco/adf-core
```

## Storybook

In case you would like to aggregate all the stories from core library use

```
nx run core:storybook
```
And navigate to `http://localhost:4400/`.

To create a Storybook core library build use

```
nx run core:build-storybook
```

## License

[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE)
npm package: @mrbbot/asyncify-wasm
Description: Standalone Asyncify helper for Binaryen
Author: Ingvar Stepanyan
Latest version: 1.3.1
Deprecated: intended for "miniflare", but no longer needed, see "html-rewriter-wasm"

# Asyncify

This is a JavaScript wrapper intended to be used with Asyncify feature of Binaryen.

Together, they allow to use asynchronous APIs (such as most Web APIs) from within WebAssembly written and compiled from any source language.

> This is a fork of [asyncify-wasm](https://github.com/GoogleChromeLabs/asyncify) that adds an additional `options`
> argument to `Instance`, `instantiate` and `instantiateStreaming`. Currently there's only one option, `wrappedExports`,
> a `Set` that specifies which module exports to wrap with Asyncify magic.

## Usage

### WebAssembly side

Import and use required APIs as regular synchronous FFI functions in your code.

After the code is compiled to WebAssembly, post-process it using `wasm-opt` from the [Binaryen toolchain](https://github.com/WebAssembly/binaryen):

```shell
wasm-opt --asyncify [-O] [--pass-arg=asyncify-imports@module1.func1,...] in.wasm -o out.wasm
```

### JavaScript side

First, import asyncify via:

```javascript
import * as Asyncify from 'https://unpkg.com/asyncify-wasm?module';
```

Compilation / instantiation APIs are designed to be drop-in replacements for those of regular `WebAssembly` interface, but with `async` support.

Then, you can use `new Asyncify.Instance`, `Asyncify.instantiate` and `Asyncify.instantiateStreaming` like you would with corresponding `WebAssembly` functions, but with added support for `async` imports and all exports wrapped into async functions, too.

For example:

```js
let { instance } = await Asyncify.instantiateStreaming(fetch('./out.wasm'), {
  get_resource_text: async url => {
    let response = await fetch(readWasmString(instance, url));
    if (!response.ok) {
      throw new Error(`HTTP ${response.status}: ${response.statusText}`);
    }
    return passStringToWasm(instance, await response.text());
  }
});

await instance.exports._start();
```