8000 GitHub - lialosiu/underscore-java: java port of Underscore.js
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lialosiu/underscore-java

 
 

Repository files navigation

underscore-java

Maven Central MIT License Build Status Coverage Status codecov.io CircleCI Codeship Status for javadev/underscore-java wercker status Build status Build Status < 8000 a href="https://app.shippable.com/projects/55def20f1895ca44741030a2" rel="nofollow">Run Status Known Vulnerabilities Codacy Badge Sputnik Code Scene BCH compliance Quality Gate Quality Gate Scrutinizer Build Status

Join the chat at https://gitter.im/javadev/underscore-java

Requirements

Java 1.6 and later.

Installation

Include the following in your pom.xml for Maven:

<dependencies>
  <dependency>
    <groupId>com.github.javadev</groupId>
    <artifactId>underscore</artifactId>
    <version>1.44</version>
  </dependency>
  ...
</dependencies>

Gradle:

compile 'com.github.javadev:underscore:1.44'

Usage

U.chain(/* array | list | set | map | anything based on Iterable interface */)
    .filter(..)
    .map(..)
    ...
    .sortWith()
    .forEach(..);
U.chain(value1, value2, value3)...
U.range(0, 10)...

U.chain(1, 2, 3) // or java.util.Arrays.asList(1, 2, 3) or new Integer[] {1, 2, 3}
    .filter(v -> v > 1)
    // 2, 3
    .map(v -> v + 1)
    // 3, 4
    .sortWith((a, b) -> b.compareTo(a))
    // 4, 3
    .forEach(System.out::println);
    // 4, 3

Underscore-java is a java port of Underscore.js.

In addition to porting Underscore's functionality, Underscore-java includes matching unit tests.

For docs, license, tests, and downloads, see: http://javadev.github.io/underscore-java

Thanks to Jeremy Ashkenas and all contributors to Underscore.js.

About

java port of Underscore.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 87.0%
  • JavaScript 13.0%
0