Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsftp

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsftp - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

.test.js.un~

6

jsftp_test.js

@@ -20,6 +20,6 @@ /*

var FTPCredentials = {
host: "",
user: "",
host: "sergimansilla.com",
user: "fjakobs",
port: 21,
pass: ""
pass: "lecatoc"
};

@@ -26,0 +26,0 @@

@@ -8,12 +8,7 @@ /*

"use strict";
var S;
var Net = require("net");
var ftpPasv = require("./lib/ftpPasv");
var Parser = require('./lib/ftpParser');
var S = require("streamer");
try { S = require("streamer"); }
catch (e) { S = require("./support/streamer/core"); }
var slice = Array.prototype.slice;

@@ -75,2 +70,3 @@

var Ftp = module.exports = function(cfg) {
"use strict";
this.raw = {};

@@ -178,3 +174,3 @@ this.options = cfg;

self.connecting = false;
!err && send();
send();
};

@@ -249,3 +245,3 @@

(function() {
"use strict";
this.addCmdListener = function(listener) {

@@ -558,3 +554,3 @@ if (this.cmdListeners.indexOf(listener) === -1)

cmd: "retr " + filePath,
pasvCallback: callback,
pasvCallback: callback
});

@@ -570,3 +566,4 @@ };

var socket = self.dataConn.socket;
socket.writable && socket.end(buffer);
if (socket.writable)
socket.end(buffer);
},

@@ -605,2 +602,20 @@ pasvCallback: callback

this.ls = function(filePath, callback) {
var entriesToList = function(err, entries) {
if (err)
return callback(err, entries);
if (!entries)
return callback(null, []);
callback(null,
(entries.text || entries)
.split(/\r\n|\n/)
.map(function(entry) {
return Parser.entryParser(entry.replace("\n", ""));
})
// Flatten the array
.filter(function(value){ return !!value; })
);
};
if (this.useList) {

@@ -630,19 +645,3 @@ this.list(filePath, entriesToList);

function entriesToList(err, entries) {
if (err)
return callback(err, entries);
if (!entries)
return callback(null, []);
callback(null,
(entries.text || entries)
.split(/\r\n|\n/)
.map(function(entry) {
return Parser.entryParser(entry.replace("\n", ""));
})
// Flatten the array
.filter(function(value){ return !!value; })
);
}
};

@@ -649,0 +648,0 @@

@@ -44,4 +44,2 @@ /*

var unixEntries = [

@@ -48,0 +46,0 @@ {

@@ -10,3 +10,2 @@ /**

"use strict";
var RE_SERVER_RESPONSE = /^(\d\d\d)(.*)/;

@@ -216,3 +215,2 @@ var RE_MULTI_RESPONSE = /^(\d\d\d)-/;

var time = group[2].replace(/(\d{2}):(\d{2})([AP]M)/, replacer);
var date = new Date(group[1] + " " + time).getTime();

@@ -219,0 +217,0 @@ var dirString = group[3];

@@ -8,4 +8,2 @@ /*

"use strict";
var Net = require("net");

@@ -17,2 +15,3 @@ var S;

module.exports = function(cfg) {
"use strict";
var data;

@@ -19,0 +18,0 @@ var callback = cfg.callback;

{
"name": "jsftp",
"id": "jsftp",
"version": "0.2.1",
"version": "0.2.2",
"description": "A sane FTP client implementation for NodeJS",
"keywords": [ "ftp", "streams", "files", "server", "client", "async" ],
"author": "Sergi Mansilla <sergi.mansilla@gmail.com>",
"author": "Sergi Mansilla <sergi.mansilla@gmail.com> (http://www.sergimansilla.com)",
"homepage": "https://github.com/sergi/jsftp",

@@ -14,3 +14,3 @@ "repository": {

"bugs": {
"web": "https://github.com/sergi/jsftp/issues"
"url": "https://github.com/sergi/jsftp/issues"
},

@@ -25,3 +25,3 @@ "dependencies": {

"engines": {
"node": ">=0.4.x"
"node": ">=0.4"
},

@@ -28,0 +28,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc