Skip to content

Florian79/nashorn-promise

 
 

Repository files navigation

license Maven Central

ES6 Promise support for Nashorn

This is a polyfill of the ES6 Promise using Java 8 CompletableFuture.

Getting Started

Setup

To add a dependency using Maven, use the following:

<dependency>
  <groupId>net.arnx</groupId>
  <artifactId>nashorn-promise</artifactId>
  <version>0.1.2</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  compile 'net.arnx:nashorn-promise:0.1.2'
}

Usage

ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
engine.eval("load('classpath:net/arnx/nashorn/lib/promise.js')");

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

ES6 Promise support for Nashorn

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 50.1%
  • JavaScript 49.9%