open-index/open-npm huggingface dataset:
npm package: @nbogie/p5.neill-utils
Description: A p5 addon library just for my personal use containing various utility methods (zip, repeat, collect).
Latest version: 0.0.7

### What's this?

A p5 addon library just for my personal use containing various utility methods (zip, repeat, collect).

It is janky, badly designed, subject to change, and not currently recommended for use by others.

This document, then, is mostly notes to myself.

### usage

This is intended to be used in a global mode p5.js script (not as an ES module).

Add

```html
<script src="https://cdn.jsdelivr.net/npm/@nbogie/p5.neill-utils@latest"></script>
```

to your html and then to your p5.js script add

```js
const result = NeillUtils.collect(10, (ix) => ix * ix);
```

At the moment it doesn't register the functions with p5 so has to be used with that prefix.

I like that better than possibly colliding with other loaded libraries, anyway.

The namespace will likely change in future.

### installation from CDNs

You would normally add one of these in your html script tags

-   https://cdn.jsdelivr.net/npm/@nbogie/p5.neill-utils@latest

You can also specify the exact single file but I think most CDNs will serve it correctly from the above (whether because of main property in package.js? or because it's umd.js?)

-   https://unpkg.com/@nbogie/p5.neill-utils@latest/dist/p5.neill-utils.umd.js

### How's it made?

Made following these guidelines [as described here](https://p5js.org/contribute/creating_libraries/), and vite library mode.

Using vite and typescript. builds to a single umd javascript file.

### Build outputs

`yarn build`

The project builds a UMD file which can be loaded into a global mode p5.js sketch by the browser.

Removed type: module from package.json

> If the package.json does not contain "type": "module", Vite will generate different file extensions for Node.js compatibility. .js will become .mjs and .cjs will become .js.

###

typescript configs

-   tsconfig.json - the base config. used for type-checking and also extended by...
-   tsconfig.dts.json - exclusively for generating .d.ts files. Extends tsconfig.json

### resources

-   https://p5js.org/contribute/creating_libraries/
-   https://p5js.org/libraries/
npm package: @nbottarini/abstract-http-client
Description: Abstract typescript types to easily switch from http client implementations by using dependency inversion principle
Author: Nicolás Bottarini
Latest version: 0.4.2

[![npm](https://img.shields.io/npm/v/@nbottarini/abstract-http-client.svg)](https://www.npmjs.com/package/@nbottarini/abstract-http-client)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Abstract Http Client
Abstract types to easily switch from http client implementations by using dependency inversion principle

## Installation

Npm:
```
$ npm install --save-dev @nbottarini/abstract-http-client
```

Yarn:
```
$ yarn add @nbottarini/abstract-http-client -D
```
npm package: @nbottarini/axios-http-client
Description: Axios Http client implementation
Author: Nicolás Bottarini
Latest version: 0.9.3

[![npm](https://img.shields.io/npm/v/@nbottarini/axios-http-client.svg)](https://www.npmjs.com/package/@nbottarini/axios-http-client)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Axios Http Client
Axios implementation for abstract-http-client

## Installation

Npm:
```
$ npm install --save @nbottarini/axios-http-client
```

Yarn:
```
$ yarn add @nbottarini/axios-http-client
```
npm package: @nbottarini/browser-simplestorage
Description: Browser localstorage and session storage implementations for @nbottarini/simplestorage
Author: Nicolás Bottarini
Latest version: 1.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/browser-simplestorage.svg)](https://www.npmjs.com/package/@nbottarini/browser-simplestorage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Browser Simple Storage
Browser localstorage and session storage implementations for @nbottarini/simplestorage

## Installation

Npm:
```
$ npm install @nbottarini/browser-simplestorage
```

Yarn:
```
$ yarn add @nbottarini/browser-simplestorage
```
npm package: @nbottarini/eventbus
Description: Simple and lightweight EventBus implementation
Author: Nicolás Bottarini
Latest version: 0.7.1

[![npm](https://img.shields.io/npm/v/@nbottarini/eventbus.svg)](https://www.npmjs.com/package/@nbottarini/eventbus)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/eventbus-js/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/eventbus-js/actions)

# EventBus
Simple and lightweight EventBus javascript implementation

## Installation

Npm:
```
$ npm install --save @nbottarini/eventbus
```

Yarn:
```
$ yarn add @nbottarini/eventbus
```

## Usage

```typescript
class Producer {
    constructor(private eventBus: EventBus) {}

    async doSomething() {
        await eventBus.post(new SampleEvent())
    }
}

class Consumer {
    constructor(private eventBus: EventBus) {
        this.eventBus.subscribe(this, SampleEvent, this.onSampleEvent)        
    }

    onSampleEvent(event: SampleEvent) {
        // Do Something
    }
}

class SampleEvent extends EventInterface {
}

```
npm package: @nbottarini/money
Description: Money type with arbitrary-precision decimal arithmetic
Author: Nicolás Bottarini
Latest version: 0.9.8

[![npm](https://img.shields.io/npm/v/@nbottarini/money.svg)](https://www.npmjs.com/package/@nbottarini/money)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/money-js/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/money-js/actions)

# Money-Js
Money type with arbitrary-precision decimal arithmetic

## Installation

Npm:
```
$ npm install --save @nbottarini/money-js
```

Yarn:
```
$ yarn add @nbottarini/money-js
```

## Usage

### Initialization
```typescript
    const amount1 = Money.of('100.42')
    const amount2 = Money.of('$100.42')
    const amount3 = Money.of('-$100.42')
    const amount4 = Money.of(100)
    const amount5 = Money.of(100.55)
```

### Arithmetic Operations
```typescript
    const amount1 = Money.of('$10')
    const amount2 = Money.of(4)

    const result1 = amount1.plus(amount2) // $14
    const result2 = amount1.minus(amount2) // $6
    const result3 = amount1.times(amount2) // $40
    const result4 = amount1.div(amount2) // $2.5
    const result5 = Money.of('-$10').abs() // $10
    const result6 = Money.of('$10').negated() // -$10
```

### Comparison
```typescript
    const amount1 = Money.of('$10')
    const amount2 = Money.of(4)

    amount1.greaterThan(amount2)
    amount1.greaterThanOrEquals(amount2)
    amount1.lessThan(amount2)
    amount1.lessThanOrEquals(amount2)
```

### Conversion
```typescript
    Money.of('$10.55').toString() // $10.55 
    Money.of(4.12).toString() // $4.12
    Money.of('$10.55').plainString() // 10.55 
    Money.of(4.12).plainString() // 4.12

    Money.of('$15.12').toNumber() // 15.12
    Money.of('$156.667').toNumber() // 156.667
```

### Formatting
```typescript
    Money.of('$15000.231').format() // '$15,000.23'
    Money.of('-15000.231').format() // '-$15,000.23'
    Money.of('15000').format(2) // $15,000
    Money.of('$15000.23').format(2, '.', ',') // '$15.000,23'
    Money.of('$15000.236').format(2, '.', ',') // '$15.000,24'
    Money.of('$15000.231').format(2, ',', '.', 'USD ') // USD 15,000.23
```
npm package: @nbottarini/observable
Description: Tiny Observable pattern implementation for creating observable properties
Author: Nicolás Bottarini
Latest version: 0.9.2

[![npm](https://img.shields.io/npm/v/@nbottarini/observable.svg)](https://www.npmjs.com/package/@nbottarini/observable)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/observable-js/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/observable-js/actions)

# Observable-Js
Tiny Observable pattern implementation for creating observable properties
## Installation

Npm:
```
$ npm install --save @nbottarini/observable
```

Yarn:
```
$ yarn add @nbottarini/observable
```

## Usage

### Observables

**View1.ts:**
```typescript
export class View1 {
    public readonly buttonClicked = observable<ClickEvent>()
    public readonly textChanged = observable<TextChangedEvent>()
    
    // Do something internally to handle UI events 
    
    private handleButtonClick(e: ClickEvent) {
        this.buttonClicked.notify(e)
    }
}
```

**View2.ts:**
```typescript
export class View2 {
    private sampleView: View1
    
    constructor() {
        this.sampleView = new View1()
        this.sampleView.buttonClicked.subscribe(this, this.onSampleViewButtonClicked)
    }

    onSampleViewButtonClicked(e: ClickEvent) {
        
    }
}
```

### Composite observables

```typescript
const buttonClicked = observable<ClickEvent>()
const textChanged = observable<TextChangedEvent>()
const allEvents = compositeObservable(buttonClicked, textChanged)

allEvents.subscribe({}, (event) => {
    // Notifies click and text changed events
})
```

### Observable values:

```typescript
const nameProperty$ = observableValue('John')
nameProperty$.value // 'John' 

nameProperty$.changed.subscribe(this, this.onNameChanged)
nameProperty$.value = 'new name' // Notifies changes to subscribers
```

### Observable computed values:
```typescript
const property1 = observableValue(1)
const property2$ = observableValue(2)
const computedProperty$ = observableComputed((value1, value2) => value1 + value2, $property1, $property2)
computedProperty$.value // returns 3 

computedProperty$.changed.subscribe(this, this.onComputedChanged)
property1$.value = 3 // Notifies new computed value 5 to computedProperty$ subscribers

```
npm package: @nbottarini/react-native-async-simplestorage
Description: React Native Async Storage implementation for @nbottarini/simplestorage
Author: Nicolás Bottarini
Latest version: 1.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/react-native-async-simplestorage.svg)](https://www.npmjs.com/package/@nbottarini/react-native-async-simplestorage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# React Native Async Simple Storage
React Native Async Storage implementation for @nbottarini/simplestorage

## Installation

Npm:
```
$ npm install @nbottarini/react-native-async-simplestorage
```

Yarn:
```
$ yarn add @nbottarini/react-native-async-simplestorage
```
npm package: @nbottarini/react-native-relative-points
Description: Utility function that eases your responsive design
Author: Nicolás Bottarini
Latest version: 0.2.0

[![npm](https://img.shields.io/npm/v/@nbottarini/react-native-relative-points.svg)](https://www.npmjs.com/package/@nbottarini/react-native-relative-points)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/react-native-relative-points/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/react-native-relative-points/actions)

# React Native relative points
Utility function that eases your responsive design

## Installation

Npm:
```
$ npm install --save @nbottarini/react-native-relative-points
```

Yarn:
```
$ yarn add @nbottarini/react-native-relative-points
```

## Usage

```typescript jsx
// Create a function named rv with your design width (for example the width used in Figma)
export const rv = (value) => relativeValueToPoints(value, 1440)

// Use your function to convert design units to proportional device units (the design proportions will be kept)
const MyComponent = () => (
    <View style={{ paddingTop: rv(14) }} />    
)

```
npm package: @nbottarini/react-native-styled
Description: React native lightweight styled components
Author: Nicolás Bottarini
Latest version: 0.8.5

[![npm](https://img.shields.io/npm/v/@nbottarini/react-native-styled.svg)](https://www.npmjs.com/package/@nbottarini/react-native-styled)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/react-native-styled/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/react-native-styled/actions)

# React Native Styled
React Native lightweight styled components 

## Installation

Npm:
```
$ npm install --save @nbottarini/react-native-styled
```

Yarn:
```
$ yarn add @nbottarini/react-native-styled
```

## Usage

```typescript jsx
import { styledPressable } from './index'

const MyApp = () => (
    <Container>
        <TextField/>
        <PrimaryButton title="Login"/>
    </Container>
)

const Container = styled(View, {
    padding: 10,
    backgroundColor: '#FEFEFE'
})

const TextField = styled(TextInput, (props) => ({
    fontSize: 10,
    backgroundColor: props.editable ? '#FFFFFF' : '#CCCCCC',
}))

const PrimaryButton = (props) => {
    return (
        <Pressable onPress={props.onPress}>
            {({ pressed }) => (
                <ButtonContainer pressed={pressed} disabled={props.isDisabled}>
                    <Text>{props.title}</Text>
                </ButtonContainer>
            )}
        </Pressable>
    );
};

// styledPressable allows to override some styles when the prop pressed is true
const ButtonContainer = styledPressable(View, (props) => ({
    backgroundColor: props.disabled ? '#CCCCCC' : '#FFFFFF',
}), {
    backgroundColor: "#F0F0F0"
})
```
npm package: @nbottarini/react-observable
Description: React hook for reacting to changes in @nbottarini/observable properties
Author: Nicolás Bottarini
Latest version: 0.6.5

[![npm](https://img.shields.io/npm/v/@nbottarini/react-observable.svg)](https://www.npmjs.com/package/@nbottarini/react-observable)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/react-observable/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/react-observable/actions)

# React observable
React hook for reacting to changes in @nbottarini/observable properties

## Installation

Npm:
```
$ npm install --save @nbottarini/react-observable
```

Yarn:
```
$ yarn add @nbottarini/react-observable
```
npm package: @nbottarini/simplestorage
Description: Abstract simple key/value storage
Author: Nicolás Bottarini
Latest version: 1.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/simplestorage.svg)](https://www.npmjs.com/package/@nbottarini/simplestorage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Simple Storage
Simple key/value storage abstraction

## Installation

Npm:
```
$ npm install @nbottarini/simplestorage
```

Yarn:
```
$ yarn add @nbottarini/simplestorage
```
npm package: @nbottarini/test-examples
Description: Simple javascript/typescript utility class to generate test examples
Author: Nicolás Bottarini
Latest version: 0.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/test-examples.svg)](https://www.npmjs.com/package/@nbottarini/test-examples)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/test-examples-js/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/test-examples-js/actions)

# Test Examples
Simple javascript/typescript utility class to generate test examples

## Installation

Npm:
```
$ npm install --save @nbottarini/test-examples
```

Yarn:
```
$ yarn add @nbottarini/test-examples
```

## Usage

```typescript
const names = new TestExamples(['alice', 'bob', 'charlie'])
names.one() // returns 'alice'
names.one() // returns 'bob'
names.one() // returns 'charlie'
names.one() // returns 'alice'

const phones = TestExamples.build(3, (number) => new Phone(`111-454${number}`))
phones.one() // returns Phone('111-4540')
phones.one() // returns Phone('111-4541')
phones.one() // returns Phone('111-4542')
phones.one() // returns Phone('111-4540')
```
npm package: @nbottarini/unhandled-error-decorator
Description: Decorates an object to capture unhandled errors on each public method
Author: Nicolás Bottarini
Latest version: 0.3.4

[![npm](https://img.shields.io/npm/v/@nbottarini/unhandled-error-decorator.svg)](https://www.npmjs.com/package/@nbottarini/unhandled-error-decorator)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/unhandled-error-decorator/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/unhandled-error-decorator/actions)

# Unhandled Error Decorator
Decorates an object to capture unhandled errors on each public method.
It helps centralize unhandled error handling on javascript applications. 

## Installation

Npm:
```
$ npm install --save @nbottarini/unhandled-error-decoration
```

Yarn:
```
$ yarn add @nbottarini/unhandled-error-decoration
```


## Usage example

```javascript
class SampleClass {
    someSyncMethodThatFails() {
        throw new Error('Something bad happened')
    }

    async someAsyncMethodThatFails() {
        throw new Error('Something bad happened')
    }
}

const myObj = new SampleClass()
const onUnhandledError = (e) => {
    // Sample error handling
    console.error(e)
}
const decoratedObj = unhandledErrorDecorator(obj, onUnhandledError)

await decoratedObj.someAsyncMethodThatFails() // Calls onUnhandledError

decoratedObj.someSyncMethodThatFails() // Calls onUnhandledError
```
npm package: @nbottarini/validator
Description: A javascript/typescript validation library
Author: Nicolás Bottarini
Latest version: 1.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/validator.svg)](https://www.npmjs.com/package/@nbottarini/validator)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/validator-js/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/validator-js/actions)

# Validator
A javascript/typescript validation library

## Installation

Npm:
```
$ npm install --save @nbottarini/validator
```

Yarn:
```
$ yarn add @nbottarini/validator
```

## Usage

```typescript
function validate(validator: Validator, form: SignupForm) {
    validator.check('firstName', form.firstName)
        .notNullOrBlank()
        .minLength(2)
        .maxLength(50)
    
    validator.check('age', form.age)
        .optional()
        .number('Must be a valid number')
        .min(18, 'Must be older than 18')

    validator.check('email', form.email)
        .email()

    validator.check('date', form.date)
        .date('DD/MM/YYYY')

    validator.check('password', form.password)
        .notNullOrBlank()
        .minLength(8)

    validator.check('confirmPassword', form.confirmPassword)
        .equals(form.password)

    validator.check('maxPrice', form.maxPrice)
        .zeroOrPositive(form.maxPrice)

    validator.check('evenNumber', form.evenNumber)
        .custom((value) => value % 2 === 0, 'Must be even')
}

const validator = new Validator()
validate(validator, signupForm)
const hasErrors = validator.hasErrors()
const errors = validator.allErrorMessages()

try {
    validator.throwIfHasErrors()
} catch (e) {
    // Do something with thrown error
}
```
npm package: @nbottarini/validator-test-utils
Description: @nbottarini/validator test utils
Author: Nicolás Bottarini
Latest version: 1.1.0

[![npm](https://img.shields.io/npm/v/@nbottarini/validator-test-utils.svg)](https://www.npmjs.com/package/@nbottarini/validator-test-utils)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Validator test utils
Testing utilities for @nbottarini/validator

## Installation

Npm:
```
$ npm install --save-dev @nbottarini/validator-test-utils
```

Yarn:
```
$ yarn add -D @nbottarini/validator-test-utils
```
npm package: @nbry/eslint-config-typescript
Description: ESLint shareable config for TypeScript projects
Author: nbry
Latest version: 1.0.0

# @nbry/eslint-config-typescript

ESLint shareable config for TypeScript projects with opinionated best practices.

## Installation

```bash
npm install --save-dev @nbry/eslint-config-typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript
```

or with yarn:

```bash
yarn add -D @nbry/eslint-config-typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript
```

## Usage

Add this to your `.eslintrc.js` or `.eslintrc.json`:

### .eslintrc.js

```javascript
module.exports = {
  extends: ['@nbry/eslint-config-typescript'],
};
```

### .eslintrc.json

```json
{
  "extends": ["@nbry/eslint-config-typescript"]
}
```

### ESLint 9+ (Flat Config)

```javascript
import nbryConfig from '@nbry/eslint-config-typescript';

export default [
  nbryConfig,
  // your overrides
];
```

## Requirements

- Node.js >= 14
- TypeScript >= 4.0.0
- ESLint >= 8.0.0
- A `tsconfig.json` file in your project root

## What's Included

This config includes:

- TypeScript ESLint parser and recommended rules
- Type-aware linting rules
- Best practices for async/await
- Consistent code style enforcement
- Unused variable detection (with underscore prefix support)

## Rules Highlights

- ✅ Enforces type-safe Promise handling
- ✅ Requires explicit type imports
- ✅ Warns on `any` usage
- ✅ Enforces consistent interface definitions
- ✅ Detects unused variables (allows `_` prefix for intentionally unused)

## Customization

You can override any rules in your own ESLint config:

```javascript
module.exports = {
  extends: ['@nbry/eslint-config-typescript'],
  rules: {
    '@typescript-eslint/no-explicit-any': 'error', // Make it stricter
    'no-console': 'off', // Allow console.log
  },
};
```

## License

MIT
npm package: @nbry/prettier-config
Description: Prettier shareable config with opinionated defaults
Author: nbry
Latest version: 1.0.0

# @nbry/prettier-config

Prettier shareable config with opinionated defaults for consistent code formatting.

## Installation

```bash
npm install --save-dev @nbry/prettier-config prettier
```

or with yarn:

```bash
yarn add -D @nbry/prettier-config prettier
```

## Usage

Add this to your `package.json`:

```json
{
  "prettier": "@nbry/prettier-config"
}
```

Or create a `.prettierrc.js` file:

```javascript
module.exports = require('@nbry/prettier-config');
```

Or extend it in `.prettierrc.json`:

```json
"@nbry/prettier-config"
```

## Configuration

This config includes:

- **100** character line length
- **2** spaces for indentation
- **Single quotes** for strings
- **Semicolons** required
- **ES5** trailing commas
- **LF** line endings
- Arrow function parens always included

## Customization

You can override any options by creating a `.prettierrc.js`:

```javascript
module.exports = {
  ...require('@nbry/prettier-config'),
  printWidth: 120, // Override line length
  singleQuote: false, // Use double quotes
};
```

## Editor Integration

### VS Code

Install the [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and add to your settings:

```json
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}
```

## License

MIT