# namify

> Convert a npm package name into a safe-to-use variable name. Use as a mixin in Yeoman generators.

Latest version **0.1.3** (published 2014-05-11) · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2014-05-11 |
| First published | 2014-05-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | name, slug, slugify, string, var, variable |

## Links

- npm: https://www.npmjs.com/package/namify
- Repository: https://github.com/jonschlinkert/namify
- Issues: https://github.com/jonschlinkert/namify/issues
- npm.io page: https://npm.io/package/namify

## Dependencies (1)

- [reserved](https://npm.io/package/reserved.md) ^0.1.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2014-05-11
- 0.1.2 — 2014-05-11
- 0.1.1 — 2014-05-11

## README

# namify [![NPM version](https://badge.fury.io/js/namify.png)](http://badge.fury.io/js/namify)

> Convert a npm package name into a safe-to-use variable name. Use as a mixin in Yeoman generators.

## Install
Install with [npm](npmjs.org):

```bash
npm i namify --save-dev
```


Install with [bower](https://github.com/bower/bower)

```bash
npm i namify --save-dev
```

## Usage

```js
var namify = require('namify');
console.log(namify('foo-bar-bar'));
//=> fooBarBaz
```
If the resulting variable name matches an [ECMAscript reserved word](https://github.com/jonschlinkert/reserved), an underscore will be prepended to the variable name.

### Yeoman generators

Use as a mixin in Yeoman generators:

```js
// in the contructor
this._.mixin(namify);

// in templates you can now do something like:
var <%= _.namify(appName) %> = require('<%= appname %>');
//=> var fooBarBaz = require('foo-bar-baz');
```

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License
Copyright (c) 2014 Jon Schlinkert, contributors.  
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 11, 2014._

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