open-index/open-npm huggingface dataset:
npm package: @purser/core
Description: Purser core module
Author: Raul Glogovetan
Latest version: 3.0.1

## [@purser/core](https://www.npmjs.com/package/@purser/core)

A collection of `helpers`, `utils`, `validators` and `normalizers` to assist the individual [purser](https://github.com/JoinColony/purser) modules.

Unless you want something specific found in this module, it doesn't need to be manually required as each module already makes use of it internally.

### Installation
```shell
npm install @purser/core
```

(Usually you won't install this package just on its own. It's meant to be an accompanying peer-dependency to the other @purser modules)

### Quick Usage
```typescript
import { bigNumber } from '@purser/core/utils'

const value = bigNumber('0.00000001').toWei();

console.log(value); // { negative: 0, words: Array(4), length: 4, red: null }
```

### Documentation

You can find more in-depth description for this module's API in the [purser docs](https://joincolony.github.io/purser/modules/_purser_core.html).

### Contributing

This package is part of the [purser monorepo](https://github.com/JoinColony/purser) package.

Please read our [Contributing Guidelines](https://github.com/JoinColony/purser/blob/master/.github/CONTRIBUTING.md) for how to get started.

### License

The `@purser/core` library along with the whole purser monorepo are [MIT licensed](https://github.com/JoinColony/purser/blob/master/LICENSE).
npm package: @purser/metamask
Description: A javascript library to interact with a Metamask based Ethereum wallet
Author: Raul Glogovetan
Latest version: 3.2.1

## [@purser/metamask](https://www.npmjs.com/package/@purser/metamask)

A `javascript` library to interact with the a [Metamask](https://metamask.io/) based Ethereum wallet. It extracts all the complexity from setting up, maintaining and interacting with it, while providing you with a predictable interface.

### Installation
```shell
npm install ethers @purser/metamask
```

### Quick Usage
```typescript
import { open } from '@purser/metamask'

const wallet = await open();

console.log(wallet); // { address: '...', chainId: '...', publicKey: '...' }
```

### Documentation

You can find more in-depth description for this module's API in the [purser docs](https://joincolony.github.io/purser/modules/_purser_metamask.html).

### Contributing

This package is part of the [purser monorepo](https://github.com/JoinColony/purser) package.

Please read our [Contributing Guidelines](https://github.com/JoinColony/purser/blob/master/.github/CONTRIBUTING.md) for how to get started.

### License

The `@purser/metamask` library along with the whole purser monorepo are [MIT licensed](https://github.com/JoinColony/purser/blob/master/LICENSE).
npm package: @purser/signer-ethers
Description: A signer to use purser with ethers.js
Author: Raul Glogovetan
Latest version: 1.0.4

## [@purser/signer-ethers](https://www.npmjs.com/package/@purser/signer-ethers)

This package allows you to use any purser wallet as an [ethers.js signer](https://docs.ethers.io/v4/api-wallet.html#signer).

### Installation

```shell
npm install ethers @purser/signer-ethers
```

### Quick Usage (using a MetaMask purser wallet)

```typescript
import { getDefaultProvider } from "ethers";
import { create } from "@purser/metamask";
import { EthersSigner } from "@purser/signer-ethers";

const provider = getDefaultProvider("ropsten");

const initSigner = async () => {
  const wallet = await create();
  const signer = new EthersSigner({ purserWallet: wallet, provider });
};
```

You can then use the signer to [connect to Ethereum contracts with ethers](https://docs.ethers.io/v4/api-contract.html#connecting-to-a-contract).

### Documentation

You can find more in-depth description for this module's API in the [purser docs](https://joincolony.github.io/purser/modules/_purser_signer_ethers.html).

### Contributing

This package is part of the [purser monorepo](https://github.com/JoinColony/purser) package.

Please read our [Contributing Guidelines](https://github.com/JoinColony/purser/blob/master/.github/CONTRIBUTING.md) for how to get started.

### License

The `@purser/core` library along with the whole purser monorepo are [MIT licensed](https://github.com/JoinColony/purser/blob/master/LICENSE).
npm package: @purser/software
Description: A javascript library to interact with a software Ethereum wallet, based on the ethers.js library
Author: Raul Glogovetan
Latest version: 2.0.1

## [@purser/software](https://www.npmjs.com/package/@purser/software)

A `javascript` library to interact with a software Ethereum wallet, based on the [ethers.js](https://github.com/ethers-io/ethers.js/) library.

It extracts all the complexity from setting up, maintaining and interacting with it, while providing you with a predictable interface.

### Installation
```shell
npm install ethers @purser/software
```

### Quick Usage
```typescript
import { open } from '@purser/software'

const wallet = await open({ mnemonic: '...' });

console.log(wallet); // { address: '...', privateKey: '...', publicKey: '...' }
```

### Documentation

You can find more in-depth description for this module's API in the [purser docs](https://joincolony.github.io/purser/modules/_purser_software.html).

### Contributing

This package is part of the [purser monorepo](https://github.com/JoinColony/purser) package.

Please read our [Contributing Guidelines](https://github.com/JoinColony/purser/blob/master/.github/CONTRIBUTING.md) for how to get started.

### License

The `purser-software` library along with the whole purser monorepo are [MIT licensed](https://github.com/JoinColony/purser/blob/master/LICENSE).
npm package: @purtuga/common-widget-elements
Description: Custom Element for use anywhere
Author: Paul Tavares
Latest version: 2.2.0

# common-widget-elements

A set of commonly used widget elements.

## Popup: `<pop-up>`

A popup widget

## Content Access: `<content-access>`

A content access widget that can block user access. Show modal overlay and intercepts keyboard tabbing.


## Icon: `<i-con>`

Show an icon from a source. Component allows for multiple sources to be defined. For more on defining sources, see [Sources Readme file](src/Icon/SOURCES.md).

## ConfirmAction `<confirm-action>`
Show a confirmation upon clicking on some content (ex. an action). Confirmation showing inline on top of action.

# Distribution Bundles

The `dist` folder contains the following built bundles:

-   `common-widget-elements.umd.min.js`: A ES6 bundle version supporting UMD
-   `common-widget-elements.esm.min.js`: A ES6 Module
-   `common-widget-elements.import.min.js`: An ES6 bundles that auto registers the Element into the browser.
-   `common-widget-elements.import.legacy.min.js`: An ES5 transpiled bundle that auto registers the Element into the browser.  
-   `common-widget-elements.legacy.umd.min.js`: An ES5 transpiled version supporting UMD

# License

[MIT](./LICENSE)
npm package: @purtuga/interactions
Description: Re-usable UI interactions.
Author: Paul Tavares
Latest version: 1.0.2

# interactions
Re-usable UI interactions and behaviours.

## Install

```bash
$ npm i --save @purtuga/interactions
```

## Usage

```javascript
import {Resizable} from "@purtuga/interactions";

const resizableDiv = new Resizable({
    ele: document.queryselector("div.resizable")
});
```

## Interactions

-   [Resizable]("./src/Resizable/README.md")

## License

[MIT](./LICENSE)
npm package: @purtuga/project-generate
Description: Add private custom generators to any project
Author: Paul Tavares
Latest version: 1.1.0

# project-generate
An easy way to add custom generators to your project.

[Yeoman](https://yeoman.io/) is great, but normally you need to have your generators packaged and installed as `npm` packages. This is usually not optimal for private projects or for generators that are project specific and not really reusable. This project uses Yeoman's generator functionally to enable the ability to create project specific generators which are store along with the Project.

## Install

```bash
npm i @purtuga/project-generate
```

## Usage
Installation will make available a script named `project-generate` under the `node_modules/.bin/` directory. Add the following `generate` script to your `package.json` under the `scripts` section so that you can run the generators using the `npm run` command:

```JSON
{
    "scripts": {
        "generate": "project-generate"
    }
}
```

Now, just run `npm run generate`.


## Generators
This utility looks for generators stored in directory named `generators`. This utility will look at the following locations in search of this directory:

- The current directory
- The root of the current project (determined by the closest `package.json` file)
- User's home directory
- This library's directory (picks up out-of-box generators)


Each generator is stored in a directory - the directory name is used as the generator name.

This tool provides some default generators which are opinionated to how I currently create projects. They are:

-   `project`: Create a new project that is based on my own `project-base` library
-   `generator`: Create a new generator (in your project's `generators` directory)


### `generator` Usage
This generator will scaffold out the structure for a new generator. It will prompt for the name and will output all files to the current project (determined by closest `package.json` file) under a directory named `generators`. If not running under a project, the files will be output to the current folder (`cwd`). 


## License

[MIT](./LICENSE)
npm package: @purtuga/web-components-polyfill-webpack-plugin
Description: A webpack plugin that will wrap your bundles with code that ensure polyfills are loaded first if the browser does not support web components
Author: Paul Tavares
Latest version: 2.1.0

# web-components-polyfill-webpack-plugin
A webpack plugin that will wrap your bundles with code that ensure polyfills are loaded first if the browser does not support web components. Ensures that your web component is only executed when the environment is ready.

Currently only for webpack 4 and above.

## Install

```bash
npm i -D @purtuga/web-comonents-polyfill-webpack-plugin
```

## Usage

In your `webpack.config.js` file, add an instance of this plugin to the `plugins` array:

```javascript
const WebComponentsPolyfill = require("web-components-polyfill-webpack-plugin");

module.exports = {
    //...
    plugins: [
        new WebComponentsPolyfill()
    ]
}
``` 

>   NOTE: Depending on your setup, the order of the plugin within the `plugins` array may make a difference. In most cases, having it at the end of the array will generate the expected bundle. 


## Options

The following options are supported

```javascript
new WebComponentsPolyfill({
    esPolyfill: "",
    wcPolfyill: "",
    generatorPolyfill: "",
    stringify: true
})
```

-   `esPolyfill` : The custom URL to be used for loading the ES Polyfill
-   `wcPolyfill` : The custom URL to be used for loading the WebComponents polyfill
-   `generatorPolyfill` : The custom URL to be used for loading the Generators polyfill.
-   `stringify`  : If set to `true` (default) then the values provide via `esPolyfill` and `wcPolyfill` will be run through `JSON.stringify()`. 

## Global Overrides

The polyfill loader will use the following from the global scope (`window`) if defined, overriding any value provided to the Plugin:

-   `window.WC_POLYFILL` : The URL to the Web Component's Polyfill
-   `window.ES_POLYFILL` : The URL for the ES Polyfill
-   `window.SKIP_ES_POLYFILL` : If set to `true`, then ES Polyfill will not be done

NOTE: Once the environment starts to get polyfilled, `window.WC_ENV` will be set with an array holding the callbacks to be executed once environment is ready. Additional ones can be added to this Array safely (aka: assured to be executed) by using the `then()` method. Example:

```javascript
window.WC_ENV.then(function(){
    console.log("Ok.. Environment is ready");
})
```

>   Note that this is only true, if the environment needed to be polyfilled!


## Examples

### Use Custom URLs

```javascript
new WebComponentsPolyfill({
    esPolyfill: "path/to/intranet/es6/polyfill.js",
    wcPolyfill: "path/to/intranet/wc/polyfill.js",
    generatorPolyfill: "path/to/intranet/generator/polyfill.js"
})
```

### Use Browser global variables for custom URLs

```javascript
new WebComponentsPolyfill({
    esPolyfill: "window.ES_INTRANET_POLYFILL_URL",
    wcPolyfill: "window.WC_INTRANET_POLYFILL_URL",
    generatorPolyfill: "window.GENERATOR_POLYFILL_URL",
    false //!! important
})
```


# License

[MIT](./LICENSE)
npm package: @purusharmaofficiall/react-native-badge-module
Description: React Native Android badge count module
Latest version: 1.0.5

# react-native-badge-module

React Native native module to set, clear, and read Android app icon badge count.

## What this library does

- Sets app icon badge count on Android launchers that support badges
- Clears app icon badge count
- Returns the last stored badge count
- Uses `ShortcutBadger` under the hood for Android badge support

## Platform behavior

- Android: fully supported (`setBadge`, `clearBadge`, `getBadgeCount`)
- iOS: this package is a no-op (returns `0` for `getBadgeCount`)

## Install

```bash
npm install react-native-badge-module
```

## Usage

```js
import Badge from 'react-native-badge-module';

Badge.setBadge(5);

const count = await Badge.getBadgeCount();

Badge.clearBadge();
```

## Android notes

- React Native autolinking handles package registration
- Do not manually add `BadgePackage()` in `MainApplication`
- Badge behavior depends on launcher/manufacturer support

## iOS badge handling (Notifee)

If you need iOS badge support, use `@notifee/react-native`:

```js
import notifee from '@notifee/react-native';

await notifee.requestPermission({ badge: true });
await notifee.setBadgeCount(5);
const iosBadgeCount = await notifee.getBadgeCount();
await notifee.setBadgeCount(0);
```

## API

- `setBadge(count: number): void`
- `clearBadge(): void`
- `getBadgeCount(): Promise<number>`