# cortml

> YAML loader

Latest version **0.0.27** (published 2017-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install cortml
pnpm add cortml
yarn add cortml
bun add cortml
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.27 |
| Published | 2017-09-16 |
| First published | 2016-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Denis Ivanov |
| Maintainers | teniryte |

## Links

- npm: https://www.npmjs.com/package/cortml
- npm.io page: https://npm.io/package/cortml

## Dependencies (6)

- [md5](https://npm.io/package/md5.md) ^2.2.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [esprima](https://npm.io/package/esprima.md) ^2.6.0
- [argparse](https://npm.io/package/argparse.md) ^1.0.7
- [chokidar](https://npm.io/package/chokidar.md) ^1.6.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.30.0

## Recent versions

- 0.0.27 (latest) — 2017-09-16
- 0.0.26 — 2017-05-26
- 0.0.21 — 2017-03-04
- 0.0.20 — 2017-03-03
- 0.0.13 — 2017-02-10
- 0.0.12 — 2017-02-10
- 0.0.11 — 2017-02-10
- 0.0.10 — 2017-02-10
- 0.0.8 — 2016-09-23
- 0.0.7 — 2016-09-17
- 0.0.4 — 2016-09-15
- 0.0.3 — 2016-09-06
- 0.0.2 — 2016-09-06
- 0.0.1 — 2016-09-05

## README

# cortml

YAML loader

## API

### Loading

```js
const cml = require('cortml');

var d = cml.loadFile('data.yaml');

```

### Base

```js

d.setProp('_name', 'Denis Ivanov');
d.setProp({
  _name: 'Denis Ivanov'
});
d.getOptions();

```

### Debug

```js

d.debug(true);

```

### Dump

```js

d.json(key);
d.jsonConsole(key);
d.jsonToFile(filename, key);
d.dump(key);
d.dumpConsole(key);
d.dumpToFile(filename, key);

```

### Events

```js

d.on('name', (...args) => {});
d.emit('name', ...args);

```

### Files

```js

d.__filename
d.__parentFilename
d.getFilename(name)
d.getParentFilename()

```

### Get / Set

```js

d.set(name, value)
d.get(name)
d.has(name)
d.delete(name)
d.update(name, value)

```

### Info

```js

d.findKeys(key)
d.keys(name)

```

### Iterations

```js

d.each(key, (value, key) => {});
d.eachPrimitive(key, (value, key) => {});
d.eachObject(key, (value, key) => {});

```

### Keys

```js

d.getParentKey();
d.getChildKey();

```

### Load / Save

```js

d.save([filename]);
d.load(source, opts, name);
d.loadFile(filename, opts, name);

```

### Structure

```js

d.wrap(data, filename);
d.child(key, filename);
d.getContext(key);
d.getParent(key);

```

### Transform

```js

d.getData(key);
d.clone(key);
d.toArray(key, '_name');

```

### Util

```js

d.flatten(data);

```

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