npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sfuture

v1.0.1

Published

JavaScript port of Scala Future

Downloads

36

Readme

sfuture

Build Status

JavaScript port of Scala Future written with TypeScript.

Compatibility

This library uses ES6 promise. So you need modern browser, io.js. If you want to use it with node.js, please ensure your node.js version is upper than 0.12.0. See ES6 compatibility table for more information.

How to use

With NPM

npm install sfuture

From source

Get source

git clone https://github.com/sgkim126/sfuture.git
cd sfuture

or

wget https://github.com/sgkim126/sfuture/archive/{version}.tar.gz
tar -xf {version}.tar.gz
cd {version}

Compile

make

Now you have {path to sfuture}/lib/sfuture.js. Use it.

How to contribute

sfuture is written with TypeScript, checks style with tslint, runs tests with mocha and checks test coverage with istanbul. npm test command tests them all.

How to compile

There are two commands to compile. One is make build(or just make) it only compiles future.js with declaration file. Another is make all. It build future.js and build all tests.

How to lint

make lint

All configuration about lint is in .tslintrc.json

How to test

make test

How to check test coverage

Currently, sfuture ensures 100% test coverage.

make cover

Changelogs

Jul 05, 2015 - 1.0.0

  • Fix a bug on find function.
  • Use es6 promise instead of mpromise.
  • Any type can be reject reason.

Jun 29, 2015 - 0.6.0

  • Change the signature of transform method
  • Implement withFilter, fromTry,
  • Rename create to apply

Jun 28, 2015 - 0.5.0

  • Implement find, zip, recoverWith, foreach and fallbackTo

Jun 20, 2015 - 0.4.0

  • Implement firstCompletedOf, fold, reduce, traverse, and collect.

Jun 20, 2015 - 0.3.2

  • Publish only the compiled files

Jun 07, 2015 - 0.3.1

  • Change Future.sequence() signature to take an array of futures instead of rest parameters

Jun 03, 2015 - 0.2.0

  • Change onComplete method to use node style callback

Jun 01, 2015 - 0.1.0

May 27, 2015 - 0.0.4

  • Implement some of methods