github web3/web3.js 0.13.0
Release 0.13.0

latest releases: v4.8.0, v4.7.0, v4.6.0...
8 years ago

This release contains the new web3.eth.syncing property and web3.eth.isSyncing(callback) convenience function.

Note that the functionality in the nodes comes with the next release, so you can't use it just yet.

Example:

web3.eth.isSyncing(function(error, sync){
    if(!error) {
        // stop all app activity
        if(sync === true) {
           // we use `true`, so it stops all filters, but not the web3.eth.syncing polling
           web3.reset(true);

        // show sync info
        } else if(sync) {
           console.log(sync.currentBlock);

        // re-gain app operation
        } else {
            // run your app init function...
        }
    }
});

Don't miss a new web3.js release

NewReleases is sending notifications on new releases.