Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/veltman/gobblefunk

Rename your JS variables with silly words derived from Dr. Seuss, Roald Dahl, and Lewis Carroll.
https://github.com/veltman/gobblefunk

Last synced: about 2 months ago
JSON representation

Rename your JS variables with silly words derived from Dr. Seuss, Roald Dahl, and Lewis Carroll.

Awesome Lists containing this project

README

        

# Gobblefunk

[![Build Status](https://travis-ci.org/veltman/gobblefunk.svg?branch=master)](https://travis-ci.org/veltman/gobblefunk)

Rename all the variables in a JavaScript file with a Markov chain based on silly words from Dr. Seuss, Lewis Caroll, and Roald Dahl books. Works within appropriate variable scopes. Detects and preserves camelCase/TitleCase/snake_case whenever possible.

## Installation

Install for programmatic usage:

```
npm install gobblefunk
```

Install for command line usage:

```
npm install -g gobblefunk
```

## Usage

```js
var gobblefunk = require("gobblefunk"),
fs = require("fs");

var js = fs.readFileSync("my-script.js", "utf8");

fs.writeFileSync("gobblefunked.js", gobblefunk(js));
```

```js
// my-script.js
function multiply(a, b) {
return a * b;
}

// gobblefunked.js
function struffulate(fizzlenut, mazurka) {
return fizzlenut * mazurka;
}
```

## Command line usage

```sh
gobblefunk my-script.js > gobblefunked.js
```

Or pipe it:

```sh
cat my-script.js | gobblefunk > gobblefunked.js
```

## Options

There are no options.