Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 10 days 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-26T14:16:29.000Z (about 8 years ago)
- Last Synced: 2024-04-25T06:43:24.317Z (7 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 9
- Watchers: 2
- 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
[![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.