conversiontools
Advanced tools
Comparing version 1.0.0 to 1.0.2
const fs = require('fs'); | ||
const request = require('./request'); | ||
const { version } = require('../package.json'); | ||
@@ -12,3 +13,4 @@ module.exports = class API { | ||
prepareHeaders(headersToAdd = {}) { | ||
return Object.assign({}, this.authorizationHeader, headersToAdd); | ||
const userAgentHeader = { 'User-Agent': `conversiontools-node/${version}` }; | ||
return Object.assign({}, this.authorizationHeader, userAgentHeader, headersToAdd); | ||
} | ||
@@ -15,0 +17,0 @@ |
@@ -62,5 +62,3 @@ const API = require('./API'); | ||
resolve => { | ||
setTimeout(() => { | ||
return resolve(); | ||
}, timeout); | ||
setTimeout(resolve, timeout); | ||
}) | ||
@@ -67,0 +65,0 @@ .then(() => { |
{ | ||
"name": "conversiontools", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "JavaScript library to convert files using Conversion Tools API at https://conversiontools.io", | ||
@@ -17,4 +17,4 @@ "keywords": [ | ||
"bugs": { | ||
"url" : "https://github.com/conversiontools/conversiontools-node/issues", | ||
"email" : "info@conversiontools.io" | ||
"url": "https://github.com/conversiontools/conversiontools-node/issues", | ||
"email": "info@conversiontools.io" | ||
}, | ||
@@ -24,4 +24,4 @@ "license": "MIT", | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://github.com/conversiontools/conversiontools-node.git" | ||
"type": "git", | ||
"url": "https://github.com/conversiontools/conversiontools-node.git" | ||
}, | ||
@@ -32,7 +32,7 @@ "scripts": { | ||
"dependencies": { | ||
"form-data": "^2.3.3", | ||
"node-fetch": "^2.2.1" | ||
"form-data": "^3.0.0", | ||
"node-fetch": "^2.6.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^5.9.0" | ||
"eslint": "^6.8.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "engines": { |
# [Conversion Tools](https://conversiontools.io) API Node.js Client | ||
[Conversion Tools](https://conversiontools.io) is an online service which offers fast and easy way to convert documents between different formats, like XML, Excel, PDF, Word, Text, CSV and others. | ||
[Conversion Tools](https://conversiontools.io) is an online service that offers a fast and easy way to convert documents between different formats, like XML, Excel, PDF, Word, Text, CSV and others. | ||
This Node.js Client allows to integrate the conversion of the files into your node.js applications. To convert the files Node.js Client uses the public [Conversion Tools REST API](https://conversiontools.io/api_documentation). | ||
This Node.js Client allows integrating the conversion of the files into your node.js applications. To convert the files Node.js Client uses the public [Conversion Tools REST API](https://conversiontools.io/api-documentation). | ||
@@ -50,3 +50,3 @@ ## Installation | ||
List of available Conversion Types and corresponding conversion options can be found on the [Conversion Tools API Documentation](https://conversiontools.io/api_documentation) page. | ||
List of available Conversion Types and corresponding conversion options can be found on the [Conversion Tools API Documentation](https://conversiontools.io/api-documentation) page. | ||
@@ -57,2 +57,2 @@ ## License | ||
Copyright (c) 2018 [Conversion Tools](https://conversiontools.io) | ||
Copyright (c) 2020 [Conversion Tools](https://conversiontools.io) |
9924
8
+ Addedform-data@3.0.1(transitive)
- Removedform-data@2.5.1(transitive)
Updatedform-data@^3.0.0
Updatednode-fetch@^2.6.0