📜 ⬆️ ⬇️

Some interesting and useful things for web developer # 15

Good day, dear habravchane. Recently, I saw some interesting and useful tools / libraries / events that I want to share with Habr.

Bitcore


image
Full-fledged JS library, fully providing support for the necessary functionality for creating Bitcoin applications.

Validation of bitcoin addresses:
var bitcore = require('bitcore'); var Address = bitcore.Address; var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"); console.log(addr.isValid()); 

')
Block and Transaction Monitoring
 var bitcore = require('bitcore'); var networks = bitcore.networks; var Peer = bitcore.Peer; var PeerManager = require('soop').load('bitcore/PeerManager', { network: networks.testnet }); var handleBlock = function(info) { console.log('** Block Received **'); console.log(info.message); }; var handleTx = function(info) { var tx = info.message.tx.getStandardizedObject(); console.log('** TX Received **'); console.log(tx); }; var handleInv = function(info) { console.log('** Inv **'); console.log(info.message); var invs = info.message.invs; info.conn.sendGetData(invs); }; var peerman = new PeerManager(); peerman.addPeer(new Peer('127.0.0.1', 18333)); peerman.on('connection', function(conn) { conn.on('inv', handleInv); conn.on('block', handleBlock); conn.on('tx', handleTx); }); peerman.start(); 




Sift.js


"Inspired Mongoi DB Array Filtering". The following operators are supported: $ in, $ nin, $ exists, $ gte, $ gt, $ lte, $ lt, $ eq, $ neq, $ mod, $ all, $ and, $ or, $ nor, $ not, $ size , $ type, $ regex; regular expression search; functional filtering; sub object searching; only 2 kb in minified form.

 var sift = require('sift'); //intersecting arrays var sifted = sift({ $in: ['hello','world'] }, ['hello','sifted','array!']); //['hello'] //regexp filter var sifted = sift(/^j/, ['craig','john','jake']); //['john','jake'] //A *sifter* is returned if the second parameter is omitted var siftPeople = sift({ //you can also filter against functions name: function(value) { return value.length == 5; } }); //filtered: [{ name: 'craig' }] siftPeople([{ name: 'craig', }, { name: 'john' }, { name: 'jake' }]); //you can test *single values* against your custom sifter siftPeople.test({ name: 'sarah' }); //true siftPeople.test({ name: 'tim' }); //false\ 


Btapp.js


image
Torrent technology in the browser - it sounds very interesting. The authors even promised stream, but judging by the commits on GitHub for some reason, the project froze. It would be great if there were habravchane who can help revive the project ...

Obelisk.js


Very "cool" library, which in its essence is a JavaScript engine for the construction of isometric objects. It is a pity that some demos on it work only in WebKit browsers, and in general it is a pity that from time to time there are projects that ignore Firefox. With Obelisk, we have already made a nice plugin for Chrome - Isometric Contributions , which transforms your statistics into GitHub.
image

Holder.js


image
An elegant solution for the substitution of images with any size.
 <img src="holder.js/300x200" /> 


Winjs


Habrayuser YuriyLuchaninov wrote in detail about this project a few days ago, but I can't help but mention it here.
Microsoft introduced the JavaScript UI-oriented library for cross-platform development - WinJS, which, although it existed for a long time, but as a separate “set” outside the binding to Windows, was presented only 04/02/2014.


Finally:




Previous selection (Release 14)

I apologize for any typos. If you notice a problem - please write in a personal.

Thank you all for your attention.

Source: https://habr.com/ru/post/218197/


All Articles