open-index/open-npm huggingface dataset:
npm package: @footgun/bitstream
Description: bit oriented bit packing and unpacking
Author: Michael Reintein
Latest version: 1.0.0

# footgun-bitstream
A bit oriented stream for packing and unpacking to a `Uint8Array`.

Useful for networking stuff, probably.


features:
* does not generate memory garbage
* data oriented design that doesn't hide stuff from you
* unit and fuzz tests
* no dependencies
* supports a lot of field types
* simple implementation, a few hundred lines
* no bounds checking bullshit to slow things down, handle your own business


# example
```javascript
import * as BitStream from '@footgun/bitstream'

// Optionally pass in a Uint8array you'd like to read/write to.
// if you don't pass one, a 1024 Uint8Array is created by default
const s = BitStream.create(new Uint8Array(2048))

// s is now initialized to a data structure you can read/write to.
// s.buf is the uint8array backing store
// s.offsetBits is the pointer to the next bit position the stream will read or write from.
//              it's incremented automatically as you rad or write.

BitStream.write.uint8(s, 20) // write the number 28 as a uint8 to the stream
BitStream.write.float32(s, -49.02334976196289)
BitStream.write.uint(s, 5, 3)  // write the number 5 as a 3 bit uint to the stream

// at this point s.offsetBits is set to 43 because that's how many bits we've written

BitStream.reset(s)  // this resets the stream's offsetBits value back to 0

console.log(BitStream.read.uint8(s))    // prints 20
console.log(BitStream.read.float32(s))  // prints -49.02334976196289
console.log(BitStream.read.uint(s, 3))  // prints 5
```


# measuring stream bit size without allocating

Some times it's useful to know how many bits a given stream would pack to without allocating or writing the data.
You can achieve this with the `measure` operations:

```javascript
const s = BitStream.create(new Uint8Array(0)) // don't need any bytes allocated

BitStream.measure.uint8(s, 36)
BitStream.measure.uint(s, 12, 6)
BitStream.measure.str(s, "hello there, I'm a utf-8 string :o")

// at this point, s.buf is [], and s.offsetBits is 302 
```

## supported types

* uint (N) arbitrary length unsigned ints where N = bitsize
* uint8
* uint16
* uint32
* uint64
* uleb128 (arbitrary length unsigned BigInts)
* float16
* float32
* float64
* unicode strings
* byte arrays


# references

Some of the original packing functions were derived from https://github.com/binaryjs/js-binarypack/blob/master/lib/binarypack.js
npm package: @footgun/cobalt
Description: A 2D WebGpu renderer
Author: Michael Reintein
Latest version: 0.11.1

# Cobalt

![A chunk of cobalt](cobaltx2.png)

A 2D Web GPU renderer.


## Goals

* pure WebGpu: no fallbacks to WebGl or canvas
* minimal abstractions: provide very light abstractions over what webgpu provides
* gl-matrix/wgpu-matrix compatible: use primitives compatible with how webgpu and webgl store rendering data (float32 arrays)
* works in both browsers and node+SDL
* GC friendly: does not thrash the garbage collector. uses API design that won't allocate memory all over the place
* back-to-front z-indexing


## install

```bash
npm install @footgun/cobalt
```

Runnable demos are available in `examples/`.
npm package: @footgun/events
Description: a data oriented poll-based event scheduler
Author: Michael Reinstein
Latest version: 0.1.0

# @footgun/events
A data oriented poll-based event scheduler.

This has proved useful in systems that poll at regular intervals, because it provides exact control over _when_ event handlers will run.


## usage

```javascript
import Events from '@footgun/events'


function simLoop () {

	// run all systems
	soundSystemTick()
	particleSystemTick()
   	inputTick()

	Events.endFrame()  // important! clears events and schedules queued events

	requestAnimationFrame(simLoop)
}


requestAnimationFrame(simLoop)


function soundSystemTick () {
	// read all events
    for (let i=0; i < Events.buffer.length; i++) {
    	const e = Events.buffer.buf[i]
    	if (e.type === 'jump') {
    		// e.entity
    		// e.args
    		playJumpSoundEffect()
    	}
    }
}


function particleSystemTick () {
	for (let i=0; i < Events.buffer.length; i++) {
    	const e = Events.buffer.buf[i]
    	if (e.type === 'jump') {
    		// e.entity
    		// e.args
    		spawnJumpParticles()
    	}
    }
}


function inputTick () {
	// other logic omitted for brevity

	if (jumpButtonPressed && canJump) {
		const entity = { } // optional context data you with to reference in the event
	    //                               append any other data you'd like as arguments here               
	    Events.add('jump', entity, 'arg1', 'arg2')
	}
}

```


## scheduling events
You can schedule events in the future:

```javascript

const tickCount = 50
const eventName = 'some_example'
Events.schedule(tickCount, eventName)
```

This will cause the event named `some_example` to appear in the Events buffer after `<tickCount>` ticks have elapsed. 
The tick is incremented every time `Events.endFrame()` is called.
npm package: @footgun/fsm
Description: A hierarchical finite state machine
Author: Michael Reinstein
Latest version: 0.3.1

# @footgun/fsm
data-oriented hierarchical finite state machines


All javascript state machine implementations I've encountered fail at least one of these criteria:

* has hierarchical machine support
* **provides a tick() function to use in sim/game loops**
* has tests
* is simple/minimalistic

So here we are. A complete hierarchical FSM in ~250 lines of code


## Testing

All tests are in a folder unsurprisingly named `test/`.  Invoke any of them like this:

```bash
deno run test/<testname>.js
```

These tests will print nothing and return an exit code of 0 on success, or they'll bitch to `stdout` when they fail.


## Usage

```javascript
import * as hFSM from '@footgun/fsm'


const machineDefinition = {
    id: 'test machine',
    initial: 'a',
    states: {
        a: {
            initial: 'b',
            on: {
                JUMP: 'd.e',
            },
            entry: function (context) { },
            exit: function (context) { },
            tick: function (context) { },
            states: {
                b: {
                    on: {
                        RUN: 'a.d.e'
                    },
                    states: {
                        c: { }
                    }
                },
                d: { }, // contains sub-state e
            }
        },
        f: { ... }
    }
}

const m = hFSM.create(machineDefinition)  // creates a new machine

const context = { } // pass in whatever data you want the state actions to have access to

hFSM.init(m, context)  // enters the initial machine state

const eventName = 'RUN'
hFSM.raiseEvent(eventName, m, context)


// in the game loop:
hFSM.tick(m, context)

```


### ANY state
sometimes you want to specify "regardless of current state, an event should always transtions to this new state".
You can do this with the `ANY` state at the top of the machine definition:

```javascript
const machineDefinition = {
    id: 'test machine',
    initial: 'a',
    states: {
        ANY: {
            on: {
                'SLEEP': 'resting'
            }
        },
        a: { ... },
        b: { ... },
        resting: { ... }
    }
}
```

When a `SLEEP` event is received, this machine will transition from the `a` OR `b` state to the `resting` state.
npm package: @footgun/input-web
Description: An efficient, pollable interface for checking the state of keyboards, mice, and gamepads in a browser.
Author: Michael Reinstein
Latest version: 0.6.0

# game-input

Provides an efficient, pollable interface for checking the state of keyboard keys, mouse buttons, and gamepad buttons in a web browser.


## Web Example

```javascript
import webInput from '@footgun/input-web'


const LEFT_MOUSE_BUTTON = 1
const MIDDLE_MOUSE_BUTTON = 2
const RIGHT_MOUSE_BUTTON = 3

const Input = webInput({
    // whichever canvas element you want mouse events relative to
    canvas: document.querySelector('canvas'),

    bindings: [
        // define all of the mouse and keyboard events you wish to listen for here
        {
            name: 'walk_left',
            event: 'key',
            value: 'KeyS',
        },
        {
            name: 'walk_right',
            event: 'key',
            value: 'KeyF',
        },
        {
            name: 'charge_arrow',
            event: 'mouse',
            value: MIDDLE_MOUSE_BUTTON
        },
        /*
        {
            name: 'fire',
            event: 'gamepad',
            gamepadIndex: 0,
            buttonIndex: 4
        },

        // you can use the analog axes as digital values as well:
        {
            name: 'down',
            event: 'gamepad',
            gamepadIndex: 0,

            isAnalog: true,

            // 0, 1  <-- left analog stick x, y
            // 2, 3  <-- right analog stick x, y
            analogAxisId: 0,

            // -1 for left or up, 1 for right or down
            analogAxisDirection: -1,

            // how much dead zone to allow before converting from analog to digital.
            // defaults to 0.1
            analogAxisDeadZone: 0.2,
        }
        */
    ]
})


// runs every frame
function gameLoop () {

    // should be called at the beginning of every frame
    Input.pollState()

    // query the input state here, perform game logic and rendering:
    console.log(Input.down('walk_left')) // true when the key is first pushed down
    console.log(Input.held('walk_left')) // true while the key is pushed and held down
    console.log(Input.up('walk_left'))   // true when the key is released

    console.log('mouse position:', Input.Mouse.position[0], Input.Mouse.position[1])
    
    requestAnimationFrame(gameLoop)
}


requestAnimationFrame(gameLoop) // start the game

```

All values for keyboard keys are from https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
npm package: @footgun/math-gap
Description: math functions that are missing or lacking from the standard javascript library
Author: Michael Reinstein
Latest version: 0.2.0

# math-gap
math functions that are missing or lacking from the standard javascript library

## clamp

It's 2024 and Javascript still doesn't have `clamp`...

### Usage

`clamp(value, a, b)`

Returns `value`, if it is between `a` and `b`. Otherwise, returns the number
it's gone past.


## lerp

Linearly interpolate between 2 values

### Usage

`lerp(a, b, amount)`

`amount` should be a value between 0 and 1, indicating how far to interpolate from `a` to `b`

```javascript

const val = lerp(10, 20, 0.5) // val === 15
```


## lerp-degrees

Linearly interpolate between 2 angles in degrees

### Usage

`lerpDegrees(a, b, amount)`

`amount` should be a value between 0 and 1, indicating how far to interpolate from `a` to `b`

```javascript

const val = lerpDegrees(120, 340, 0.5) // val === 230
```


## sign

`Math.sign` was added to Javascript somewhat recently. It's behavior regarding `0` is to not give it 
a positive or negative sign:

```javascript
Math.sign(1)  // returns 1
Math.sign(0)  // returns 0
Math.sign(-1) // returns -1
```

In some cases, we want want to consider 0 as a positive value, and alias 0 to 1.
This comes up in games and simulations, e.g., a 2d sprite can only face left or right (-1 or 1)

That's what this module does:
```javascript
sign(1)  // returns 1
sign(0)  // returns 1
sign(-1) // returns -1
```


## to-degrees

Converts `radians` to its corresponding value in `degrees`.

```javascript
const d1 = toDegrees(0.5235987755982988)  // d1 === 29.999999999999996

const d2 = toDegrees(0.5235987755982989)  // d2 === 30.000000000000004
````


## to-radians

Converts `degrees` to its corresponding value in `radians`.

```javascript
const val = toRadians(30) // val === 0.5235987755982988
````


## bitfield

get and set bits

```javascript
let flags = 0 // a byte (contains 8 bits)
flags = bitfield.set(flags, 0, true)  // flags === 00000001
flags = bitfield.set(flags, 2, true)  // flags === 00000101
console.log(bitfield.get(flags, 2))   // true
console.log(bitfield.get(flags, 1))   // false
flags = bitfield.set(flags, 0, false) // flags === 00000100
````


## quantize-angle
pack/unpack an angle expressed in radians to/frame a byte

```javascript
const angle = Math.PI * 0.3

const u = new Uint8Array(1)
u[0] = quantizeAngle.pack(angle)


const angle2 = quantizeAngle.unpack(u[0])

console.log(angle === angle2) // true
```
npm package: @footron/messaging
Description: ## Attribution
Author: BYU PCCL
Latest version: 0.1.6

# @footron/messaging

## Attribution

Based on our [Python messaging library](https://github.com/BYU-PCCL/footron-messaging-python) with patterns from the [controls client](https://github.com/BYU-PCCL/footron-controls-client).
npm package: @fooxly/babel-preset
Description: The default Babel preset for Fooxly projects.
Author: Fooxly
Latest version: 3.0.0
Deprecated: This package will be moved to another package

# Fooxly Babel Preset

The default [Babel](https://babeljs.io/) preset for [Fooxly](https://www.fooxly.com) projects.

[![npm version](https://img.shields.io/npm/v/@fooxly/babel-preset.svg?style=flat)](https://www.npmjs.com/package/@fooxly/babel-preset)
[![downloads](https://img.shields.io/npm/dt/@fooxly/babel-preset.svg)](https://www.npmjs.com/package/@fooxly/babel-preset)
[![ci status](https://github.com/Fooxly/babel-preset/workflows/tests/badge.svg)](https://github.com/Fooxly/babel-preset/actions?query=workflow%3Atests)

## :rocket:&nbsp; Powered By

- [core-js@3](https://www.npmjs.com/package/core-js)
- [regenerator-runtime](https://www.npmjs.com/package/regenerator-runtime)
- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env)
- [@babel/plugin-proposal-class-properties](https://www.npmjs.com/package/@babel/plugin-proposal-class-properties)
- [@babel/plugin-proposal-optional-chaining](https://www.npmjs.com/package/@babel/plugin-proposal-optional-chaining)
- [@babel/plugin-proposal-export-default-from](https://www.npmjs.com/package/@babel/plugin-proposal-export-default-from)
- [babel-plugin-module-resolver](https://www.npmjs.com/package/babel-plugin-module-resolver) (configured for all `.js`, `.jsx` & `.json` files in `./src`)

## :heart:&nbsp; Support us

> About **40%** of your donation goes to one of the charities we support. For further information or questions please visit [our website](https://www.fooxly.com/charity) or contact us via [charity@fooxly.com](mailto:charity@fooxly.com).

<p>
  <a title="BuyMeACoffee" href="https://www.buymeacoffee.com/fooxly">
    <img src="https://developer.fooxly.com/general/assets/images/buymeacoffee.png" alt="BuyMeACoffee" width="25%" style="max-width: 180px" />
  </a>&nbsp;&nbsp;
  <a title="Patreon" href="https://www.patreon.com/fooxly">
    <img src="https://developer.fooxly.com/general/assets/images/patreon.png" alt="Patreon" width="25%" style="max-width: 180px"/>
  </a>&nbsp;&nbsp;
  <a title="PayPal" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3GEYSYZFXV9GE">
    <img src="https://developer.fooxly.com/general/assets/images/paypal.png" alt="PayPal" width="25%" style="max-width: 180px" />
  </a>
</p>

<br/>

## :cloud:&nbsp; Installation

### using npm

```sh
npm install --save-dev @fooxly/babel-preset
```

### using yarn

```sh
yarn add -D @fooxly/babel-preset
```

## :triangular_ruler:&nbsp; Usage

### using .babelrc

```json
{
  "presets": ["@fooxly/babel-preset"]
}
```

### using package.json

```json
...
"babel": {
  "presets": ["@fooxly/babel-preset"]
}
...
```

### using React or React Native

Check out [@fooxly/babel-preset-react](https://www.npmjs.com/package/@fooxly/babel-preset-react).
npm package: @fooxly/ios-simulator
Description: Easy to use IOS simulator commands
Author: Fooxly
Latest version: 1.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# :page_facing_up:&nbsp; IOS Simulator

A custom written CLI for easy to use commands based on the
existing `xcrun` commands.

A package by [Fooxly](https://www.fooxly.com).

[![npm version](https://img.shields.io/npm/v/@fooxly/ios-simulator.svg?style=flat)](https://www.npmjs.com/package/@fooxly/ios-simulator)
![npm bundle size](https://img.shields.io/bundlephobia/min/@fooxly/ios-simulator.svg)

## :rocket:&nbsp; Recent Changes

* List all the simulators
* Transfer files to the simulator
* open an app or website via a deeplink/url

## :cloud:&nbsp; Installation

### using npm

```sh
npm install -g @fooxly/ios-simulator
```

### using yarn

```sh
yarn global add @fooxly/ios-simulator
```

## :closed_book:&nbsp; Commands
### Listing the devices
```sh
sim list
```
This command lists all the simulators you have installed.

### Boot a simulator
```sh
sim boot <device name>

or

sim launch <device name>

or

sim start <device name>

or

sim <device name>
```
These commands let you start the simulator of your choice.
The device name for the simulator is the name visible inside of the `sim list`
command. for example 
```sh
sim boot "iPhone 11 Pro"
```

### Open an url or deeplink
```sh
sim open <url>
```
Opes a link inside of your simulator.

### Upload a file
```sh
sim upload [<paths>]
```
Upload 1 or multiple files based on the given paths.
You can upload as many files as you would like, just add the paths to
the end of the command.

### clean up unused devices
```sh
sim remove-unused

or

sim clean-up
```
This removes all the unused sims and sims that are not available.

## :clipboard:&nbsp; To-do

* boot via the device udid
* remove a device
* `shutdown` the active simulator
* `predict` the action if the second parameter is not a function. (url can be opened, udid or name can launch)

## :heart:&nbsp; Support our projects

You can support us by donating through [BuyMeACoffee](https://www.buymeacoffee.com/fooxly) or [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3GEYSYZFXV9GE).

[![BuyMeACoffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/fooxly)&nbsp;&nbsp;&nbsp;
[![PayPal](https://i.imgur.com/T3AmGss.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3GEYSYZFXV9GE)
npm package: @fooyun/split-layout
Description: This component allows you to split your screen both vertically and horizontally, with infinite nesting. It also maintains the state of the already split sections.
Author: fooyun
Latest version: 0.2.0

# split-layout

This component allows you to split your screen both vertically and horizontally, with infinite nesting. It also maintains the state of the already split sections.

You can resize pane, split pane in vertical and horizontal, and close pane.

## demo online
[demo](https://fooyun.github.io/split-layout/)

## usage
```jsx
import { useContext, useState } from 'react';
import { Layout, PaneContext } from '@fooyun/split-layout';

const Counter = () => {
  const [counter, setCounter] = useState(0);

  return (
    <div>
      <span>current is: {counter}</span>
      <span
        style={{ color: 'green', marginLeft: '20px', cursor: 'pointer' }}
        onClick={() => setCounter((c) => c + 1)}
      >
        add
      </span>
    </div>
  );
};

const SplitCounter = () => {
  const paneContext = useContext(PaneContext);

  const splitVertical = () => {
    paneContext?.splitVertical(<SplitCounter />);
  };

  const splitHorizontal = () => {
    paneContext?.splitHorizontal(<SplitCounter />);
  };

  const removePane = () => {
    paneContext?.removePane();
  };

  const operateStyle = {
    textAlign: 'right',
    marginBottom: '20px',
  };

  const operateBtnStyle = {
    marginLeft: '10px',
    color: '#08f',
    cursor: 'pointer',
  };

  return (
    <div>
      <div style={operateStyle}>
        <span style={operateBtnStyle} onClick={splitVertical}>vertical</span>
        <span style={operateBtnStyle} onClick={splitHorizontal}>horizontal</span>
        {paneContext?.canClose && <span style={operateBtnStyle} onClick={removePane}>close</span>}
      </div>
      <div>
        <Counter />
      </div>
    </div>
  );
}

export default () => {
  return (
    <div style={{width: '100%', height: 300, border: 'solid 1px red'}}>
      <Layout>
        <SplitCounter />
        <SplitCounter />
      </Layout>
    </div>
  );
}
```
npm package: @fop-ts/core
Description: Function Oriented Programming (FOP) in Typescript
Author: David Shekunts
Latest version: 0.0.21

<h3>
  <a href="https://fop.davidshekunts.ru/">
    <img src="https://fop.davidshekunts.ru/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbeede22b-3fb7-4d77-b011-c7647b25962a%2FFOP_Logo.png?table=block&id=101ffcdc-ef71-463c-81c9-ecf20130d74b&spaceId=b5a6916f-2c86-42ae-9a5c-d25bf5231a44&width=250&userId=&cache=v2">
  </a>
</h3>

# Functional Oriented Programming (FOP) in TypeScript

This library contains minimal set of types and functions, that can help 
you creating application in Functional Oriented Programming style.

More on Functional Oriented Programming (FOP) you can find here:

🇷🇺 https://fop.davidshekunts.ru

# ATTENTION

Right now this library in PRE-ALPHA MODE, so its better for you just to 
download it as zip ("Code" -> "Download ZIP") and use files, located in
`src` folder.

When library will be stabilized I'll announce it in this repo, so you can
hit "Watch" or "Star" to get notification.

# Used by

1. 🛌 FDD (https://github.com/Dionid/fdd-ts) – Fatigue Driven Development
1. 💬 Teleadmin (https://github.com/Dionid/teleadmin) – Admin and CRM for Telegram.

# News

All news and announcements you can find in:

🇷🇺 🦾 IT-Качалка Давида Шекунца 💪 – https://t.me/it_kachalka

# License

The MIT License (MIT)
npm package: @foqum/flowtag-render
Description: Flowtag render
Latest version: 1.0.55

# flowtag-render

[![NPM](https://img.shields.io/npm/v/flowtag-render.svg)](https://www.npmjs.com/package/@foqum/flowtag-render) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm i @foqum/flowtag-render
```

### Install local dependency

Assuming both projects (flowtag_react, flowtag-render) are at the same height

```bash
micarpetadeproyectos>flowtag_react>
micarpetadeproyectos>flowtag-render>
```

Link the dependency

```bash
micarpetadeproyectos>flowtag-render> npm i
micarpetadeproyectos>flowtag-render> npm link
```

use the dependency link in flowtag_react

```bash
micarpetadeproyectos>flowtag_react> npm link flowtag-render
micarpetadeproyectos>flowtag_react> npm i
```

Use the react library in both projects

```bash
micarpetadeproyectos>flowtag-render> npm link ../flowtag_react/node_modules/react
```

## Usage

```tsx
import React, { Component } from "react";

import { FlowtagRenderController } from "flowtag-render";

const App = () => {
  return <div>{FlowtagRenderController()}</div>;
};
```

## License

MIT © [](https://github.com/)
npm package: @foqum/object-to-formdata
Description: A convenient JavaScript function that converts an object to a FormData instance
Author: Parmesh Krishen
Latest version: 0.0.1

# object-to-formdata
A convenient JavaScript function that converts an object to a FormData instance

```js
const objectToFormData = require('object-to-formdata')

const object = {
  /**
   * key-value mapping
   * values can be primitives or objects
   */
}

const options = {
  /**
   * whether or not to include array indices in FormData keys
   * defaults to false
   */
  indices: false
}

const formData = objectToFormData(
  object,
  options, // optional
  existingFormData, // optional
  keyPrefix // optional
)

console.log(formData)
```
npm package: @foqum/tcomb-form-native-templates-material
Description: Material UI templates for `tcomb-form-native`
Author: Foqum
Latest version: 0.0.1
Deprecated: Moved to tcomb-form-native-templates-material

# tcomb-form-native-templates-material
Material UI templates for `tcomb-form-native`

This module host some templates for
[tcomb-form-native](https://github.com/gcanti/tcomb-form-native), replacing its
default components based on [Bootstrap](https://getbootstrap.com/) for new ones
following the [Material](https://material.io/) guidelines.
npm package: @foqum/walk-object
Description: Walk an object's keys
Author: Mark McKelvy
Latest version: 0.0.1

# walk-object
Walks an object's keys, calling a function when each node is reached. Walk can be performed synchronously or asynchronously.

## Synchronous example
```
const { walkObject } = require('walk-object')

const obj = {
  order: {
    number: 123,
    customer: {
      name: 'John Smith'
    },
    items: [
      {
        sku: 456,
        description: 'shirt'
      },
      {
        sku: 789,
        description: 'pants'
      }
    ]
  },
}

walkObject(obj, ({ value, location, isLeaf }) => {
  if (isLeaf) console.log(value, location)
})

//
123, ['order', 'number']
'John Smith', ['order', 'customer', 'name']
456, ['order', 'customer', 'items', 0, 'sku']
'shirt', ['order', 'customer', 'items', 0, 'description']
789, ['order', 'customer', 'items', 1, 'sku']
'pants', ['order', 'customer', 'items', 1, 'description']
```

## Async example
```
const { walkObjectAsync } = require('walk-object')

const obj = {
  order: {
    number: 123,
    customer: {
      name: 'John Smith'
    },
    items: [
      {
        sku: 456,
        description: 'shirt'
      },
      {
        sku: 789,
        description: 'pants'
      }
    ]
  },
}

const vals = []

// Simulate some async function...
async function logValues({ value, location, isLeaf }) {
  return new Promise((resolve) => {
    setTimeout(() => {
      if (isLeaf) {
        asyncVals.push({value, location})
        resolve()
      }
    }, 250)
  })
}

walkObjectAsync(obj, logValues)

console.log(vals)

//
[
  {
    value: 123,
    location: ['order', 'number']
  },
  {
    value: 'John Smith',
    location: ['order', 'customer', 'name']
  },
  {
    value: 456,
    location: ['order', 'customer', 'items', 0, 'sku']
  },
  {
    value: 'shirt',
    location: ['order', 'customer', 'items', 0, 'description']
  },
  {
    value: 789,
    location: ['order', 'customer', 'items', 1, 'sku']
  }
    value: 'pants',
    location: ['order', 'customer', 'items', 1, 'description']
  }
]
```

## Installation
```
npm install --save walk-object
```

## API
#### `walkObject(root, fn)` and `walkObjectAsync(root, fn)`

param: `{object} root` - The object to walk.

param: `{function} fn` - Function to call on each node. For `walkObjectAsync`, `fn` must be an `async` function (i.e. a function that returns a promise).

The function will be passed an object with the following properties:

`value: {any}` - The value of the current node.

`key: {string}` - The key for the current node. If node is an element of an array key will be in the format of `key:index`. See walk-object.test.js for an example.

`location: {array}` - The full location of the current node (see examples above).

`isLeaf: {boolean}` - Whether or not the node is a leaf.

## Test
```
npm test
```

## License
MIT
npm package: @for-humans-lab/log-scope-linux-app
Description: The next gen log reader
Author: For Humans Lab
Latest version: 1.2.4

# Log Scope 🔔
[![For-Humans-Lab](https://circleci.com/gh/For-Humans-Lab/log-scope-app.svg?style=svg)](https://app.circleci.com/pipelines/github/For-Humans-Lab/log-scope-app?branch=master)

The app that provides you a better tool to monitor your rn application and debug it via log messages

## ⬇️ Installation 
Pick a tool according to your OS:
1. `npm i @for-humans-lab/log-scope-linux-app`
2. <strike>`npm i @for-humans-lab/log-scope-mac-app`</strike> (Under construction 🔨)
3. `npm i @for-humans-lab/log-scope-win-app`

⚠️ **Some of a RN CLI files will be automatically patched. In other words, it slightliy changes the watch's tool behaviour in case of console use** ⚠️

## ✅ Usage 
The appliсaction handles all text messages from dev server's output in the specified format that are considered as 

(`route parts separated by '>'` -> `text message` | `data in JSON`.)

e.g. `App > Cart -> Init | {}`


All this templating works are **done** by [Log Scope Driver lib](https://github.com/For-Humans-Lab/log-scope)


Just follow the driver [installation instructions](https://github.com/For-Humans-Lab/log-scope#usage)

After [a successful installation](https://github.com/For-Humans-Lab/log-scope-app#installation) you can lunch the app: `npx log-scope`

![](./docs/assets/app.png)

### 🚀 Launching RN dev server
Press the `play` button in menu to start the server.
The state of the server are shown in a `status panel`.

- 🔵 The server is active
- 🟠 Bindling
- 🟣 App is running

🚀 To start bundling send an refresh signal (`refresh button`) to an remote app

After a successful launch logs will be rapidly colleted by **Log Scope**.

### 👀 Filtering
All log events have their routes, which are specified in a [registration](https://github.com/For-Humans-Lab/log-scope#logger-registration) stage.

Next routes 
```typescript
["App", "Main page", "Maybe interesting"]
["App", "Main page"]
["App", "Cart"]
```
have the following **filtering tree**

![tree](./docs/assets/tree.png)

All routes are matched per part.

### Other stuff
Also app contains:
- ⚠️ Pretty traceback reader
- 💅 Json data reader

### 🚄 Performance
In fact of internal implementation of node's `child_process`, each log entry walks through the following way: **app** > **http transport** > **dev server** > **pipes** > **Log Scope**. It makes possible to send a near `unlimited amount of data` in each log entry `🔥without performance loses🔥`


## ⚒ Development 

According to a environmental dependency of an application (RN CLI), you have to explicitly set the `DEV_APPLICATION` variable to your app's folder: `/home/<USER>/repos/<app folder>`.

So you can run the log scope in development mode:
`npm run dev` for dev server and `npm run start` for app launch.


## 🔄 Releases 

Packages are automatically published when some changes were merged in the master branch

## 👐 Contribution
Feel free to create `PRs`.
npm package: @for-humans-lab/log-scope-win-app
Description: The next gen log reader
Author: For Humans Lab
Latest version: 1.2.0

# Log Scope 🔔
[![For-Humans-Lab](https://circleci.com/gh/For-Humans-Lab/log-scope-app.svg?style=svg)](https://app.circleci.com/pipelines/github/For-Humans-Lab/log-scope-app?branch=master)

The app that provides you a better tool to monitor your rn application and debug it via log messages

## ⬇️ Installation 
Pick a tool according to your OS:
1. `npm i @for-humans-lab/log-scope-linux-app`
2. <strike>`npm i @for-humans-lab/log-scope-mac-app`</strike> (Under construction 🔨)
3. <strike>`npm i @for-humans-lab/log-scope-win-app`</strike> (Under construction 🔨)

⚠️ **Some of a RN CLI files will be automatically patched. In other words, it slightliy changes the watch's tool behaviour in case of console use** ⚠️

## ✅ Usage 
The appliсaction handles all text messages from dev server's output in the specified format that are considered as 

(`route parts separated by '>'` -> `text message` | `data in JSON`.)

e.g. `App > Cart -> Init | {}`


All this templating works are **done** by [Log Scope Driver lib](https://github.com/For-Humans-Lab/log-scope)


Just follow the driver [installation instructions](https://github.com/For-Humans-Lab/log-scope#usage)

After [a successful installation](https://github.com/For-Humans-Lab/log-scope-app#installation) you can lunch the app: `npx log-scope`

![](./docs/assets/app.png)

### 🚀 Launching RN dev server
Press the `play` button in menu to start the server.
The state of the server are shown in a `status panel`.

- 🔵 The server is active
- 🟠 Bindling
- 🟣 App is running

🚀 To start bundling send an refresh signal (`refresh button`) to an remote app

After a successful launch logs will be rapidly colleted by **Log Scope**.

### 👀 Filtering
All log events have their routes, which are specified in a [registration](https://github.com/For-Humans-Lab/log-scope#logger-registration) stage.

Next routes 
```typescript
["App", "Main page", "Maybe interesting"]
["App", "Main page"]
["App", "Cart"]
```
have the following **filtering tree**

![tree](./docs/assets/tree.png)

All routes are matched per part.

### Other stuff
Also app contains:
- ⚠️ Pretty traceback reader
- 💅 Json data reader

### 🚄 Performance
In fact of internal implementation of node's `child_process`, each log entry walks through the following way: **app** > **http transport** > **dev server** > **pipes** > **Log Scope**. It makes possible to send a near `unlimited amount of data` in each log entry `🔥without performance loses🔥`


## ⚒ Development 

According to a environmental dependency of an application (RN CLI), you have to explicitly set the `DEV_APPLICATION` variable to your app's folder: `/home/<USER>/repos/<app folder>`.

So you can run the log scope in development mode:
`npm run dev` for dev server and `npm run start` for app launch.


## 🔄 Releases 

Packages are automatically published when some changes were merged in the master branch

## 👐 Contribution
Feel free to create `PRs`.