Comparing version 2.15.0 to 2.16.0
"use strict"; | ||
var async = require('async'); | ||
var mapLimit = require('async/mapLimit'); | ||
@@ -7,3 +7,3 @@ | ||
var out = {}, errs = []; | ||
async.mapLimit(keys, tasks, function(item, chain) { | ||
mapLimit(keys, tasks, function(item, chain) { | ||
iterator(item, function(err, result) { | ||
@@ -10,0 +10,0 @@ out[item] = err ? null : result; |
"use strict"; | ||
var sprintf = require('../string/sprintf'); | ||
var repeat = require('mout/string/repeat'); | ||
var crop = require('mout/string/crop'); | ||
var sprintf = require('../string/sprintf'); | ||
var repeat = require('mout/string/repeat'); | ||
var truncate = require('nyks/string/truncate'); | ||
@@ -34,4 +34,5 @@ var LF = "\n"; | ||
var box = function(title, msg){ | ||
var box = function(/*[title, msg]*/){ | ||
var args = [].slice.call(arguments); | ||
var dotrim = true, pad_len = COLS; | ||
@@ -42,8 +43,9 @@ | ||
if(typeof msg !== "string") | ||
msg = JSON.stringify(msg); | ||
msg = JSON.stringify(msg, null, 2); | ||
msg = msg.trim().replace(" ", " ").split(/\r?\n/); | ||
msg = msg.trim().replace(" ", " ").split(/\r?\n/);//use 4 tab indent | ||
msg.forEach(function(tmp_line, i) { | ||
if(dotrim) | ||
msg[i] = crop(tmp_line, COLS, "…"); | ||
msg[i] = truncate(tmp_line, COLS); | ||
//msg[i] = preg_replace('#&[^;]*?#m','…',); | ||
@@ -50,0 +52,0 @@ pad_len = Math.max(pad_len, msg[i].length + 2); //2 chars enclosure |
"use strict"; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var async = require('async'); | ||
var queue = require('async/queue'); | ||
var forEach = require('mout/array/forEach'); | ||
@@ -43,3 +43,3 @@ var debounce= require('mout/function/debounce'); | ||
module.exports = function(dir_path, taskcb, endcb){ | ||
var q = async.queue(function(stat, cb){ | ||
var q = queue(function(stat, cb){ | ||
if(stat) | ||
@@ -46,0 +46,0 @@ taskcb(stat); |
@@ -57,5 +57,9 @@ "use strict"; | ||
var req = https.request(query, function(res){ | ||
var shouldBuffer = !! query.json; | ||
var transport = query.protocol == 'https:' ? https : http; | ||
var req = transport.request(query, function(res){ | ||
var shouldBuffer = query.json || startsWith(res.headers["content-type"], "application/json"); | ||
if(!shouldBuffer) | ||
@@ -62,0 +66,0 @@ return chain(null, res); |
{ | ||
"name": "nyks", | ||
"version": "2.15.0", | ||
"version": "2.16.0", | ||
"description": "nodejs exupery style", | ||
@@ -11,3 +11,3 @@ "keywords": [ | ||
"dependencies": { | ||
"async": "^1.5.2", | ||
"async": "^2.0.0-rc.2", | ||
"crc-32": "^0.3.0", | ||
@@ -14,0 +14,0 @@ "mout": "^1.0.0", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6
28304
59
778
20
+ Addedasync@2.6.4(transitive)
+ Addedlodash@4.17.21(transitive)
- Removedasync@1.5.2(transitive)
Updatedasync@^2.0.0-rc.2