# connman-config

> Parse and stringify Connman configuration files

Latest version **1.0.0** (published 2016-03-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install connman-config
pnpm add connman-config
yarn add connman-config
bun add connman-config
```

## 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 | 1.0.0 |
| Published | 2016-03-18 |
| First published | 2016-03-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Juan Cruz Viotti |
| Maintainers | jviotti |
| Keywords | connman, config, parse, generate |

## Links

- npm: https://www.npmjs.com/package/connman-config
- Repository: https://github.com/resin-io-modules/connman-config
- Issues: https://github.com/resin-io-modules/connman-config/issues
- npm.io page: https://npm.io/package/connman-config

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.6.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-03-18

## README

connman-config
==============

> Parse and stringify Connman configuration files

[![npm version](https://badge.fury.io/js/connman-config.svg)](http://badge.fury.io/js/connman-config)
[![dependencies](https://david-dm.org/resin-io-modules/connman-config.svg)](https://david-dm.org/resin-io-modules/connman-config.svg)
[![Build Status](https://travis-ci.org/resin-io-modules/connman-config.svg?branch=master)](https://travis-ci.org/resin-io-modules/connman-config)
[![Build status](https://ci.appveyor.com/api/projects/status/yoqidafd33br7q3n/branch/master?svg=true)](https://ci.appveyor.com/project/resin-io/connman-config/branch/master)

Installation
------------

Install `connman-config` by running:

```sh
$ npm install --save connman-config
```

Documentation
-------------


* [connman](#module_connman)
    * [.stringify(object)](#module_connman.stringify) ⇒ <code>String</code>
    * [.parse(string)](#module_connman.parse) ⇒ <code>Object</code>

<a name="module_connman.stringify"></a>

### connman.stringify(object) ⇒ <code>String</code>
**Kind**: static method of <code>[connman](#module_connman)</code>  
**Summary**: Stringify a Comman configuration object  
**Returns**: <code>String</code> - connman configuration string  
**Access:** public  

| Param | Type | Description |
| --- | --- | --- |
| object | <code>Object</code> | configuration object |

**Example**  
```js
var connman = require('connman-config');

connman.stringify({
  service_home_ethernet: {
    Type: 'ethernet',
    Nameservers: [
      '8.8.8.8',
      '8.8.4.4'
    ]
  },
  service_home_wifi: {
    Type: 'wifi',
    Name: 'Resin'
  }
});

[service_home_ethernet]
Type = ethernet
Nameservers = 8.8.8.8,8.8.4.4
```
<a name="module_connman.parse"></a>

### connman.parse(string) ⇒ <code>Object</code>
**Kind**: static method of <code>[connman](#module_connman)</code>  
**Summary**: Parse a Connman configuration string  
**Returns**: <code>Object</code> - connman configuration object  
**Access:** public  

| Param | Type | Description |
| --- | --- | --- |
| string | <code>String</code> | configuration string |

**Example**  
```js
var connman = require('connman-config');

connman.parse([
  '[service_home_ethernet]',
  'Type = ethernet',
  'Nameservers = 8.8.8.8,8.8.4.4'
].join('\n'));

{
  service_home_ethernet: {
    Type: 'ethernet',
    Nameservers: [
      '8.8.8.8',
      '8.8.4.4'
    ]
  },
  service_home_wifi: {
    Type: 'wifi',
    Name: 'Resin'
  }
}
```

Support
-------

If you're having any problem, please [raise an issue](https://github.com/resin-io-modules/connman-config/issues/new) on GitHub and I'll be happy to help.

Tests
-----

Run the test suite by doing:

```sh
$ npm test
```

Contribute
----------

- Issue Tracker: [github.com/resin-io-modules/connman-config/issues](https://github.com/resin-io-modules/connman-config/issues)
- Source Code: [github.com/resin-io-modules/connman-config](https://github.com/resin-io-modules/connman-config)

Before submitting a PR, please make sure that you include tests, and that [jshint](http://jshint.com) runs without any warning:

```sh
$ npm run-script lint
```

License
-------

The project is licensed under the MIT license.

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