open-index/open-npm huggingface dataset:
npm package: @gjmcn/atomic-agents
Description: Spatial Agent-based Modeling in JavaScript.
Author: Graham McNeill
Latest version: 0.1.11

# Atomic Agents

__Spatial agent-based modeling in JavaScript__

* [Docs](https://gjmcn.github.io/atomic-agents)

* [Examples](https://observablehq.com/collection/@gjmcn/atomic-agents)

This module was written for the _Visualising Contact Networks in Response to COVID-19_ UKRI-funded project (University of Warwick and Swansea University). It is still under active development &mdash; contributions are welcome.
npm package: @gjmcn/atomic-agents-vis
Description: Visualise Atomic Agents simulations.
Author: Graham McNeill
Latest version: 0.4.5

# atomic-agents-vis

Visualise [Atomic Agents](https://gjmcn.github.io/atomic-agents) simulations with WebGL (via [PixiJS](https://pixijs.com/)).

__[Docs](https://gjmcn.github.io/atomic-agents-vis)__

__[Examples](https://observablehq.com/collection/@gjmcn/atomic-agents)__

This module was written for the Visualising Contact Networks in Response to COVID-19 UKRI-funded project (University of Warwick and Swansea University). It is still under active development — contributions are welcome.
npm package: @gjmcn/data-cube
Description: Array-Oriented JavaScript.
Author: Graham McNeill
Latest version: 0.2.1

Data-Cube adds array-oriented programming to JavaScript.

See the [project website](http://gjmcn.github.io/data-cube/) for examples, usage instructions and the docs.

See this [Observable notebook](https://beta.observablehq.com/@gjmcn/data-cube-array-oriented-javascript) for a quick overview of Data-Cube.
npm package: @gjmcn/data-cube-hull
Description: Concave/convex hull method for Data-Cube.
Author: Graham McNeill
Latest version: 0.2.0

Concave/convex hull method for [Data-Cube](https://gjmcn.github.io/data-cube).

See the [Data-Cube plugins page](https://gjmcn.github.io/data-cube/index.html?plugins) for loading instructions.

See [this Observable Notebook](https://beta.observablehq.com/@gjmcn/data-cube-polygon-and-hull-plugins) for the documentation and examples.
npm package: @gjmcn/data-cube-polygon
Description: Polygon methods for Data-Cube.
Author: Graham McNeill
Latest version: 0.2.0

Polygon methods for [Data-Cube](https://gjmcn.github.io/data-cube).

See the [Data-Cube plugins page](https://gjmcn.github.io/data-cube/index.html?plugins) for loading instructions.

See [this Observable Notebook](https://beta.observablehq.com/@gjmcn/data-cube-polygon-and-hull-plugins) for the documentation and examples.
npm package: @gjmcn/data-cube-print-console
Description: Print Data-Cubes in the terminal.
Author: Graham McNeill
Latest version: 0.2.0

Print [Data-Cubes](https://gjmcn.github.io/data-cube) in the terminal.

See the [Data-Cube plugins page](https://gjmcn.github.io/data-cube/index.html?plugins) for loading instructions.

The module adds two methods to `Array.prototype`:

* `print`: print a cube (or a standard array)

* `info`: print summary information about a cube (or a standard array)

The methods call `console.log` and return the cube/array.

Currently, the only formatting option is whether to draw lines between rows:

```js
const setOps = require('@gjmcn/data-cube-print-console');
setOps({compact: false});   //draw lines
```

## Notes

* Since `print` and `info` return the calling array, they can be used to print intermediate results. For example, `x.sum().print().sqrt()`.

* `print` and `info` do *not* convert a standard array to a cube like core Data-Cube methods do.

* This module *cannot* be used in the browser; see [data-cube-print-html](https://github.com/gjmcn/data-cube-print-html).
npm package: @gjmcn/xset
Description: Subclass of JavaScript's built-in Set with extra methods.
Author: Graham McNeill
Latest version: 0.1.0

# xset

Subclass of JavaScript's [built-in `Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) with extra methods.

## Usage:

Install:

```
install --save @gjmcn/xset
```

The module has a single named export: `XSet`.

## Methods

Use any `Set` methods as well as:

| Method | Description | Return |
|:---|:---|:---|
| `copy()` | Shallow copy. `xs.copy()` is equivalent to `new XSet(xs)`. | xset |
| `adds(iterable)` | Add each element of `iterable` to the xset. | xset |
| `deletes(iterable)` | Delete each element of `iterable` from the xset. | xset |
| `filter(f, returnArray)` | Each element is passed to the function `f`; if `f` returns a truthy value, the element is included in the result. If `returnArray` is truthy, `filter` returns a new array, otherwise returns a new xset. | xset or<br>array |
| `map(f, returnArray)` | Each element is passed to the function `f`; the returned values are collected in a new array (if `returnArray` is truthy) or a new xset. | xset or<br>array |
| `count(f)` | Each element is passed to the function `f`; `count` returns the number of times that `f` returns a truthy value. | number |
| `find(f)` | Each element is passed to the function `f`; the first time `f` returns a truthy value, the corresponding element is returned. `find` returns `undefined` if no element produces a truthy value. | any |
| `every(f)` | Each element is passed to the function `f`; if `f` returns a truthy value every time, `every` returns `true` &mdash; and returns `false` otherwise. | boolean |
| `some(f)` | Each element is passed to the function `f`; the first time `f` returns a truthy value, `some` returns `true`. If `f` returns a falsy value every time, `some` returns `false`. | boolean |
| `first()` | First element of the set, or `undefined` if the set is empty. | any |
| `difference(iterable1, iterable2, ...)` | Returns a new xset containing every element in the calling xset that is not in any of the passed iterables. | xset |
| `intersection(iterable1, iterable2, ...)` | Returns a new xset containing every element that appears in the calling xset <i>and all</i> of the passed iterables. The order of elements in the returned xset matches their order in the calling xset. | xset |
| `union(iterable1, iterable2, ...)` | Returns a new xset containing every element that appears in the calling xset or any of the passed iterables. The order of elements in the returned xset is based on their first occurrence in the calling xset and iterables. | xset |

## Example

```js
const s = new XSet([3, 4, 5]);   // XSet {3, 4, 5}
s.add(10);                       // XSet {3, 4, 5, 10}
s.adds([20, 30]);                // XSet {3, 4, 5, 10, 20, 30}

s.filter(e => e < 15);           // new Xset {3, 4, 5, 10}
s.intersection([0, 5, 10, 15]);  // new XSet {5, 10}
```
npm package: @gjmcn/zap
Description: Zap Language
Author: Graham McNeill
Latest version: 0.4.3

Zap is a compile-to-JavaScript language with a clean, concise syntax and powerful high-level operators. Zap can use JavaScript objects and libraries, and vice-versa.

See [the docs](https://gjmcn.github.io/zap) for more details.