uv
, http_parser
, npm
, openssl
, and v8
.cluster
rolled back to version 0.10 ( setupMaster
behavior), console.dir
accepts options, events are capable of displaying / returning other events that have the ability to flow (event that is leaking). In short, we have a lot of changes you need to know about before upgrading.uv
version included in 0.11.14, is rc1. Also, when I visited the uv
repository to check out the latest commits, I noticed a cool logo with a unicornorex (dinosaur unicorn).PhantomJS
and the author used it to automatically convert icons for iOS and Android projects. This is similar to the cool use of Node / Gulp / Grunt as part of a non-web-native chain of assemblies, which I had never suspected. WebKit().load('http://github.com').png('github.png').pdf('github.pdf')
PhantomJS
or Selenium
, but they all always caused difficulties.PhantomJS
itself has a strange API, especially if you are accustomed to the standard development of Node-applications. That is why I was delighted to hear about Nightmare (GitHub: segmentio / nightmare , license: MIT , npm: nightmare ), the purpose of which is to simplify the software interface of interaction with PhantomJS
.Nightmare
in action, be careful, you will need to install PhantomJS
on your system. This can be done using Homebrew
on Macs, and here (on the main project site) you can find packages for other platforms.Nightmare
has a chained programming interface (API) that allows you to run JavaScript over the DOM on the target page. If, for example, you have a page with jQuery
loaded, then you can access $
in the evaluate
function during the callback.app.js
), then I filled in the input form and sent it to the server. The code in the evaluate
function will be executed on the page, so that I can use jQuery
to work with DOM. var server = require('./app'); var Nightmare = require('nightmare'); new Nightmare() .goto('http://localhost:3000') .type('input[name="email"]', 'alex@example.com') .type('input[name="password"]', 'password') .click('.sign-in') .evaluate(function() { return $('.sign-out').is(':visible'); }, function(visible) { assert(visible, '.sign-out should be visible'); }) .run(function() { server.close(); });
PhantomJS
, but I think it could be cool enough to use Nightmare
to test complex code on the client side. 'pepitus'.startsWith('pep'); 'hi.there'.substringFrom('.'); // 'there' { a: 1, b: 2 }.forEach(function(value, key) { console.log(key, value); });
The goal of this module is to reflect as closely as possible the C program interface presented bylibpq
and provide an absolutely minimal level of abstraction. This product is designed to be extremely low-level and give the user the same access to libpq as it is possible to get directly from C, except for node.js! Since you have to pay for everything, the fee for “proximity to hardware” is the need to use a JavaScript interface similar in style to C in JavaScript.
PostgreSQL
library - pg , and he also recently released node-pg-native , which is a high-performance PostgreSQL
module using node-libpq
. var rows = client.querySync('SELECT NOW() AS the_date') console.log(rows[0].the_date) //Tue Sep 16 2014 23:42:39 GMT-0400 (EDT)
Source: https://habr.com/ru/post/239927/
All Articles