Giter Site home page Giter Site logo

szkocsovszki / underscore-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from javadev/underscore-java

0.0 1.0 0.0 7.68 MB

java port of Underscore.js

Home Page: https://javadev.github.io/underscore-java/

License: MIT License

Java 86.91% JavaScript 13.09%

underscore-java's Introduction

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 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.43</version>
  </dependency>
  ...
</dependencies>

Gradle:

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

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.

underscore-java's People

Contributors

javadev avatar terhesb avatar skezzowski avatar szkocsovszki avatar borosh avatar psobot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.