# lego-modify

> modify file content with lego init.

Latest version **0.0.3** (published 2015-06-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install lego-modify
pnpm add lego-modify
yarn add lego-modify
bun add lego-modify
```

## 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.3 |
| Published | 2015-06-05 |
| First published | 2015-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | herbertliu |
| Maintainers | herbertliu |
| Keywords | modify, lego |

## Links

- npm: https://www.npmjs.com/package/lego-modify
- Repository: https://github.com/legojs/lego-modify
- Issues: https://github.com/legojs/lego-modify/issues
- npm.io page: https://npm.io/package/lego-modify

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ~0.6.5
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.0

## Recent versions

- 0.0.3 (latest) — 2015-06-05
- 0.0.2 — 2015-06-05

## README

# legorc [![Build Status](https://travis-ci.org/legojs/legorc.png)](https://travis-ci.org/legojs/legorc)

The rc manager for lego.

----

## Upgrade info for 1.x.x

Now we use `~/.lego/legorc` as default rc file for [lego@3.x](https://github.com/legojs/lego/tree/master);

## Usage

```js
var legorc = require('legorc');
```

legorc is located at `~/.lego/legorc` in ini format. An example:

```
[user]
username = lego

[template:arale]
url = http://aralejs.org/hello
```


### legorc.get

Get information in legorc:

```js
legorc.get('user')
// {username: 'lego'}

legorc.get('user.username')
// lego
```

### legorc.set

Set value in a section:

```js
legorc.set('user.username', 'legojs')
```

### legorc.config

A mix of get and set:

```js
legorc.config('user.username')  // equal legorc.get
legorc.config('user.username', 'lego')  // equal legorc.set
```

### legorc.parse

Parse an ini file to object. Default file is `~/.lego/legorc`.

```js
legorc.parse(file)
// an object
```

### legorc.write

Write object to `~/.lego/legorc`.

```js
legorc.write(obj)
```

## Changelog

**2013-03-26** `1.0.0`

`legorc` -> `legorc`.

**2013-03-26** `0.1.3`

bugfix for windows. windows use `process.env.HOMEPATH`.

**2013-03-17** `0.1.2`

legorc has `user.temp` default value.

**2013-03-17** `0.1.1`

legorc has default values.

**2013-03-14** `0.1.0`

First version.

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