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

https://github.com/ragingwind/node-bengbenge

Array for Round-Robin DNS service, bengbenge, beng, beng. for funny
https://github.com/ragingwind/node-bengbenge

Last synced: 24 days ago
JSON representation

Array for Round-Robin DNS service, bengbenge, beng, beng. for funny

Awesome Lists containing this project

README

          

# bengbenge (뺑뺑이 in Korean) [![Build Status](https://travis-ci.org/ragingwind/bengbenge.svg?branch=master)](https://travis-ci.org/ragingwind/bengbenge)

> Simple loop array for round-robin dns, beng, beng. for funny.

## Install

```
$ npm install --save bengbenge
```

## Usage

```js
var bengbenge = require('bengbenge');
var dns = bengbenge('newapp.herokuapp.com');

['app1', 'app2', 'app3', 'app4', 'app5']
dns.append(5, function (index, length) {
length++;
return {
name: 'site' + length,
url: length + '.newapp.herokuapp.com'
};
});

redirect(dns.beng().url);
```

For more information, Please refer to test/bengbenge_test.js

## API

### bengbenge(dns)

Pass base name of DNS will be route. It will return instance of loop array

### LoopArray

Supports all of api of Array and append, clear, remove and beng

#### beng()

It will return next item in Array.

#### append([count], [array/object])

It supports a variety types of arguments.

## License

MIT © [Jimmy Moon](http://ragingwind.me)