# organic-nucleus

> Implementation of node-organic/Nucleus

Latest version **3.0.0** (published 2019-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install organic-nucleus
pnpm add organic-nucleus
yarn add organic-nucleus
bun add organic-nucleus
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-09-10 |
| First published | 2014-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Boris Filipov |
| Maintainers | outbounder |

## Links

- npm: https://www.npmjs.com/package/organic-nucleus
- Repository: https://github.com/node-organic/organic-nucleus
- Issues: https://github.com/node-organic/organic-nucleus/issues
- npm.io page: https://npm.io/package/organic-nucleus

## Dependencies (4)

- [organic](https://npm.io/package/organic.md) >=1.0.0
- [resolve](https://npm.io/package/resolve.md) ^1.12.0
- [reactions](https://npm.io/package/reactions.md) 0.0.13
- [organic-dna-branches](https://npm.io/package/organic-dna-branches.md) 0.0.2

## Recent versions

- 3.0.0 (latest) — 2019-09-10
- 2.0.0 — 2018-04-15
- 1.0.1 — 2017-04-26
- 1.0.0 — 2016-01-14
- 0.0.4 — 2016-01-13
- 0.0.3 — 2014-09-11
- 0.0.2 — 2014-08-26
- 0.0.1 — 2014-05-10

## README

# organic-nucleus

Implementation of [node-organic/Nucleus](https://github.com/VarnaLab/node-organic/blob/master/docs/Nucleus.md)

## api

### constructor (plasma, dna, root)

___arguments___
* `plasma` - organic plasma instance
* `dna` - dna containing definitions of organelles and their respective `source` paths.
* `root` - organelles root, will be prepended **only when `source` starts with `./`**
  * defaults to `process.env.ORGANELLES_PATH || process.cwd()`

### buildOne(c [, callback])

Builds once organelle using data wrapped in chemical `c`.

Chemical should have the following structure:

    {
      "source": "relative/path/to/organelle",
      // ... organelle's own dna data
    }

___arguments___
* `c.source` having value typeof
  * `Function` - used as Organelle constructor
  * `String` - used as path to require Organelle implementation

All Modules representing Organelles instantiated by Nucleus are expected to have the following signature

    module.exports = function(plasma, dna) {}

Where:

  * `plasma` is the Nucleus' plasma
  * `dna` is the portion of the dna used to instantiate the Organelle

### build(c [, callback])

Builds organelles using data wrapped in chemical `c`.

Chemical should have one of the following structures:

    {
      "source": "cwd/relative/path/to/organelle",
      // ... organelle's own dna data

      -- or --

      "branch": "branch.innerBranch"
    }

    -- or --

    "branch.innerBranch"

___arguments___
  * `c` as `Object`
    * `c.source` - directly passes control flow to `buildOne`
    * `c.branch` - selects dna node using dot notation namespace query (ex: "branch.innerNode") and iterates through the dna node by constructing all found organelles (those dna branches who have `source` property).
  * `c` as `String` - indicates dna namespace, uses the same control flow as with chemicals having `c.branch`

---
_Source: https://npm.io/package/organic-nucleus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
