rr

WebJar for rr

License

License

GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

rr
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

rr
WebJar for rr
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jprichardson/rr

Download rr

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/rr/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>rr</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/rr/
implementation 'org.webjars.bower:rr:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.bower/rr/
implementation ("org.webjars.bower:rr:0.1.0")
'org.webjars.bower:rr:jar:0.1.0'
<dependency org="org.webjars.bower" name="rr" rev="0.1.0">
  <artifact name="rr" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='rr', version='0.1.0')
)
libraryDependencies += "org.webjars.bower" % "rr" % "0.1.0"
[org.webjars.bower/rr "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

rr

A simple JavaScript component to iterate an array round robin.

Why?

Sometimes you want to loop over an array and start at the beginning again.

Install

Node.js/Browserify

npm install --save rr

Component

component install jprichardson/rr

Bower

bower install rr

Script

<script src="/path/to/rr.js"></script>

Usage

rr(array, [lastIndex])

Example

var rr = require('rr')

var list = ['a', 'b', 'c']
console.log(rr(list)) //a
console.log(rr(list)) //b
console.log(rr(list)) //c
console.log(rr(list)) //a

console.log(rr(list,1)) //c
console.log(rr(list,2)) //a 

splice(array, idx, len)

spliceCurrent(array, len)

License

(MIT License)

Copyright 2013, JP Richardson

Versions

Version
0.1.0