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: 5 months ago
JSON representation
Rename your JS variables with silly words derived from Dr. Seuss, Roald Dahl, and Lewis Carroll.
- Host: GitHub
- URL: https://github.com/veltman/gobblefunk
- Owner: veltman
- Created: 2016-08-25T15:44:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-26T14:16:29.000Z (over 9 years ago)
- Last Synced: 2025-06-14T19:49:01.617Z (7 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - veltman/gobblefunk - Rename your JS variables with silly words derived from Dr. Seuss, Roald Dahl, and Lewis Carroll. (others)
README
# Gobblefunk
[](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.