open-index/open-npm huggingface dataset:
npm package: @hrimsoft/state-store
Description: centralized js-objects store
Author: Basim Al-Jawahery
Latest version: 1.1.0

# state-store.js  
![GitHub](https://img.shields.io/github/license/basim108/state-store-js)
![npm](https://img.shields.io/npm/v/@hrimsoft/state-store)
![npm](https://img.shields.io/npm/dy/@hrimsoft/state-store)

This is a centralized object store that works in the browser and nodejs.
# installing
`npm install @hrimsoft/state-store --save`
or
`yarn add @hrimsoft/state-store`
# usage
## Putting value into the storage:
```
import stateStore from '@hrimsoft/state-store';

stateStore.register('key', 10);
```
## Getting value from the storage
```
import stateStore from '@hrimsoft/state-store';

// getting a value by key
let value = stateStore.resolve('key');

// setting a new  a value in the store
stateStore.register('key', value + 1);
```
## Optimizations
To make searching process faster use period-separated delimeter in the key. The storage is optimized by using a tree structure to store objects. Key splits by a period '.' on parts and each part becomes a node of the tree structure; therefore, the complexity of searching algorithm becomes O(Log(n)).
npm package: @hrimsoft/utils
Description: Utilities to make work with JavaScript easier
Author: Basim Al-Jawahery
Latest version: 1.0.0

# @hrimsoft/utils 
![GitHub](https://img.shields.io/github/license/basim108/utils-js)
![npm](https://img.shields.io/npm/v/@hrimsoft/utils)
![npm](https://img.shields.io/npm/dy/@hrimsoft/utils)

This is a centralized object store that works in the browser and nodejs.
# installing
`npm install @hrimsoft/utils --save`
or
`yarn add @hrimsoft/utils`
# usage
## Checking arguments on null, white space or empty arrays
```
import _ from '@hrimsoft/utils';
// or
// const _ = require('@hrimsoft/utils').default

_.isNull('  '); // true
_.isNotNull('  '); // false; it's more readable than if(!_.isNull('   '))...

_.isNull([]); // true
```
## Checking callback functions before calling them
```
import _ from '@hrimsoft/utils';
// or
// const _ = require('@hrimsoft/utils').default

function my_func(callback){
    if(_.isFunction(callback))
      callback.call();
}

// if you have an object and you need to check it member on being a function dynamically
const obj = {
    prop: {
        method: (x) => x + 1;
    }
}
_.isFunction('prop.method', obj)); // true
```
## Casting to numbers
```
import _ from '@hrimsoft/utils';
// or
// const _ = require('@hrimsoft/utils').default

_.toNumber('.5'); // 0.5
_.toNumber('12'); // 12
_.toNumber(true); // 1
_.toNumber(['1',false, '-12.3']); // [1,0,-12.3]
```
## Casting to boolean
```
import _ from '@hrimsoft/utils';
// or
// const _ = require('@hrimsoft/utils').default

_.toBool(5);     // true
_.toBool(0);     // false
_.toBool('');    // false
_.toBool('  ');  // false

// argument could be in any case
_.toBool('TrUe');  // true
_.toBool('FalSe);  // false

_.toBool(null);    // false
_.toBool({});      // true
_.toBool([]);      // false
_.toBool([1,'false', ' ', { prop: 10 }]); // [true, false, false, true]
```
npm package: @hrimthurs/mediator
Description: [![npm](https://img.shields.io/npm/v/@hrimthurs/mediator.svg)](https://npmjs.com/@hrimthurs/mediator) [![info badge](https://img.shields.io/npm/dt/@hrimthurs/mediator.svg)](https://npm-stat.com/charts.html?package=@hrimthurs/mediator)
Author: @hrimthurs
Latest version: 1.4.2

# Mediator

[![npm](https://img.shields.io/npm/v/@hrimthurs/mediator.svg)](https://npmjs.com/@hrimthurs/mediator)
[![info badge](https://img.shields.io/npm/dt/@hrimthurs/mediator.svg)](https://npm-stat.com/charts.html?package=@hrimthurs/mediator)

![Image](./Mediator.drawio.svg "icon")