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

eksi-sozluk

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eksi-sozluk - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

.travis.yml

33

lib/request.js
var debug = require('./debug')('request');
var request = require("request");
var https = require("https");

@@ -9,3 +9,4 @@ module.exports = withOptions;

var options = {
url: url,
host: 'eksisozluk.com',
path: url,
followRedirect: false,

@@ -18,4 +19,3 @@ headers: {

var qs = url.match(/\?([\w\=\&]+)/),
hostname = url.match(/(\w+:\/\/[^\/]+)/)[1];
var qs = url.match(/\?([\w\=\&]+)/);

@@ -26,8 +26,7 @@ qs = qs ? '?' + qs[1] : '';

return request(options, function(error, response, body){
function done(error, response, body){
var redirect;
if(response && response.headers.location){
redirect = hostname + response.headers.location + qs;
redirect = 'https://eksisozluk.com' + response.headers.location + qs;
debug('Redirecting to: ', redirect);

@@ -48,3 +47,21 @@ withOptions(redirect, callback);

});
};
https.request(options, function (response) {
var str = '';
//another chunk of data has been recieved, so append it to `str`
response.on('data', function (chunk) {
str += chunk;
});
response.on('error', function (error) {
done(error);
});
//the whole response has been recieved, so we just print it out here
response.on('end', function () {
done(undefined, response, str);
});
}).end();
}

@@ -1,3 +0,3 @@

var TEMPLATE = 'https://eksisozluk.com/{0}?p={1}',
STEMPLATE = 'https://eksisozluk.com/autocomplete/query?q={0}',
var TEMPLATE = '/{0}?p={1}',
STEMPLATE = '/autocomplete/query?q={0}',
format = require("new-format");

@@ -4,0 +4,0 @@

{
"name": "eksi-sozluk",
"version": "0.0.12",
"version": "0.0.13",
"description": "NodeJS client to query Eksi Sozluk",

@@ -10,6 +10,5 @@ "main": "index.js",

"scripts": {
"test": "fox"
"test": "fox -t 5000"
},
"dependencies": {
"request": "*",
"new-format": "0.0.1",

@@ -16,0 +15,0 @@ "anglicize": "0.0.0",

@@ -1,2 +0,2 @@

## eksi-sozluk
## eksi-sozluk [![Build Status](https://travis-ci.org/azer/node-eksi-sozluk.png?branch=master)](https://travis-ci.org/azer/node-eksi-sozluk)

@@ -3,0 +3,0 @@ NodeJS client to query Eksi Sozluk

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