open-index/open-npm huggingface dataset:
npm package: @nightlycommit/d-n
Description: n-sided dice, the functional way
Author: Eric MORAND
Latest version: 1.0.0

# d-n

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage percentage][coveralls-image]][coveralls-url]

> n-sided dice, the functional way

## Installation

```bash
npm install @nightlycommit/d-n
```

## Usage

```typescript
import {createDice} from "d-n";

const d2 = createDice(2);

d2(); // return an integer greater or equal to 1 and lower or equal to 2
```

## API

Read the [documentation](https://nightlycommit.github.io/d-n) for more information.

## Contributing

* Fork the main repository
* Code
* Implement tests using [tape](https://github.com/substack/tape)
* Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue

## License

Apache-2.0 © [Eric MORAND]()

[npm-image]: https://badge.fury.io/js/@nightlycommit/d-n.svg
[npm-url]: https://npmjs.org/package/@nightlycommit/d-n
[travis-image]: https://travis-ci.com/NightlyCommit/d-n.svg?branch=master
[travis-url]: https://travis-ci.com/NightlyCommit/d-n
[coveralls-image]: https://coveralls.io/repos/github/NightlyCommit/d-n/badge.svg
[coveralls-url]: https://coveralls.io/github/NightlyCommit/d-n
npm package: @nightlycommit/html-source-map-rebase
Description: Rebase your HTML assets based on a source map.
Author: Eric MORAND
Latest version: 3.1.2

# html-source-map-rebase

[![NPM version][npm-image]][npm-url] [![Coverage percentage][coveralls-image]][coveralls-url]

Rebase your HTML assets relatively to the source file they were imported from.

## Installation

```bash
npm install html-source-map-rebase
```

## Example

Consider the following Twig sources:

index.twig

``` html
<img src="./foo.png">

{% include "partials/bar.twig" %}
```

partials/bar.twig

``` html
<img src="../bar.png">
<style>
    .foo {
        background-image: url("../bar.png");
    }
</style>
```

By rebasing the assets relatively to the file they were imported from, the resulting HTML would be:

``` html
<img src="foo.png">
<img src="bar.png">
<style>
    .foo {
        background-image: url("bar.png");
    }
</style>
```

Yes, you read it well: it also rebases resources referenced by inline styles.

## How it works

html-source-map-rebase uses the mapping provided by source maps to resolve the original file the assets where imported from. That's why it *needs* a source map to perform its magic. Any tool able to generate a source map from a source file is appropriate. Here is how one could use [Twing](https://www.npmjs.com/package/twing) and html-source-map-rebase together to render an HTML document and rebase its assets.

``` javascript
import {TwingEnvironment, TwingLoaderFilesystem} from "twing";
import {createRebaser} from "html-source-map-rebase";

const loader = new TwingLoaderFilesystem('src');
const environment = new TwingEnvironment(loader, {
  source_map: true
});

return environment.render('index.twig')
    .then((html) => {
        const map = environment.getSourceMap();
        const rebaser = createRebaser(Buffer.from(map));
    
        return rebaser.rebase(html);
    })
    .then((result) => {
        // result.data contains the HTML markup with rebased assets
        // result.map contains the source map
    });
```

## API

Read the [documentation](https://nightlycommit.gitlab.io/html-source-map-rebase) for more information.

## Contributing

### Prerequisites

* [nyc](https://www.npmjs.com/package/nyc)

### Usage

* Fork the main repository
* Code
* Implement tests using [tape](https://www.npmjs.com/package/tape)
* Check the test coverage by executing `nyc npm run test`
* Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue and must maintain a 100% test coverage

## License

Apache-2.0 © [Eric MORAND](https://gitlab.com/eric.morand)

[npm-image]: https://badge.fury.io/js/html-source-map-rebase.svg
[npm-url]: https://npmjs.org/package/html-source-map-rebase
[coveralls-image]: https://coveralls.io/repos/gitlab/nightlycommit/html-source-map-rebase/badge.svg
[coveralls-url]: https://coveralls.io/gitlab/NightlyCommit/html-source-map-rebase
npm package: @nightlylabs/linera-wallet-standard
Description: Linera wallet standard
Latest version: 0.1.2

# Linera Wallet Standard

The Linera Wallet Standard defines APIs for wallet and application interactions for the Linera ecosystem.

It is based on a general [Wallet Standard](https://github.com/wallet-standard/wallet-standard) which is is a chain-agnostic set of interfaces and conventions that aim to improve how applications interact with injected wallets.

## Code

- [LineraWallet](./src/wallet.ts) and [LineraWalletAccount](./src/account.ts) interfaces
- Wallet [registerWallet](https://github.com/wallet-standard/wallet-standard/blob/master/packages/core/wallet/src/register.ts#L25) function
- App [getLineraWallets](./src/detect.ts) function
- Example of a [wallet integration](./example/wallet.ts)
npm package: @nightlylabs/wallet-adapter-core
Description: Nightly Aptos Wallet Adapter Core
Latest version: 5.0.2

# Aptos Wallet Adapter core functionality

The core functionality for the wallet adapter that holds and manages the adapter state, validations and interaction with the current connected wallet.

### Usage

```ts
import { WalletCore } from "@nightlylabs/wallet-adapter-core";

const walletCore = new WalletCore([], dappConfig);

const wallets = walletCore.wallets();
```