open-index/open-npm huggingface dataset:
npm package: @orago/variable-observer
Description: Custom variables with events
Author: Orago
Latest version: 1.0.8

# @orago/variable-observer

### Usage:


```html
new VariableObserver(<startingValue>);
```

```js
import VariableObserver from '@orago/variable-observer';

const test = new VariableObserver('friday');
```

### Creating a listener
```js
function myCallback (value){
	console.log('hello world, today is', value);
}

test.subscribe(myCallback);
```

### Updating values
```js
test.value = 'saturday';
/* console => */ 'hello world, today is saturday'
```

### Removing a listener
```js
test.unsubscribe(myCallback);
```

### Handling minor changes in an object
By default, this util will not handle changes within an object

you will have to do this yourself

```js
const me = new VariableObserver({
	name: 'orago',
	age: 17
});

me.value.name = 'gato';
// Nothing happens since value wasn't modified directly

// to manually call all subscribed events use
me.notify();
```
npm package: @oraichain/bitcoin-json-rpc
Description: Bitcoin JSON RPC with type validation
Author: Andreas Brekken
Latest version: 1.4.3

# bitcoin-json-rpc

Bitcoin JSON RPC for TypeScript with Response Type Enforcement

## Installing

`npm install bitcoin-json-rpc`

## Example usage

```typescript
import BitcoinJsonRpc from 'bitcoin-json-rpc';

const rpc = new BitcoinJsonRpc('http://localhost:8332');

const balance = await rpc.getBalance();
console.log(balance);
```

## Non-standard methods

Methods not exposed by Bitcoin Core, such as `omni_getwalletaddressbalances`
or Liquid's `getbalance` are prefixed i.e. `getLiquidBalanceForAsset`.

## Motivation

There are plenty of Bitcoin forks, including Omni, Zcash, and Blockstream Liquid.
These forks often introduce breaking changes to the JSON RPC responses that
are not reflected in their documentation.

This library provides TypeScript types for RPC commands and validates the responses
using `io-ts`. If the response does not match the schema, an error is thrown.

## Author

Andreas Brekken

## License

MIT