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

deepl-node

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepl-node - npm Package Compare versions

Comparing version 1.7.4 to 1.7.5

6

CHANGELOG.md

@@ -8,2 +8,7 @@ # Changelog

## [1.7.5] - 2023-01-25
### Fixed
* Also send options in API requests even if they are default values.
## [1.7.4] - 2023-01-09

@@ -154,2 +159,3 @@ ### Fixed

[1.7.5]: https://github.com/DeepLcom/deepl-node/compare/v1.7.4...v1.7.5
[1.7.4]: https://github.com/DeepLcom/deepl-node/compare/v1.7.3...v1.7.4

@@ -156,0 +162,0 @@ [1.7.3]: https://github.com/DeepLcom/deepl-node/compare/v1.7.2...v1.7.3

24

dist/index.js

@@ -131,5 +131,3 @@ "use strict";

const formalityStr = String(formality).toLowerCase();
if (formalityStr !== 'default') {
searchParams.append('formality', formalityStr);
}
searchParams.append('formality', formalityStr);
}

@@ -185,3 +183,3 @@ if (glossary !== undefined) {

}
if (options.splitSentences) {
if (options.splitSentences !== undefined) {
options.splitSentences = options.splitSentences.toLowerCase();

@@ -198,18 +196,18 @@ if (options.splitSentences === 'on' || options.splitSentences === 'default') {

}
if (options.preserveFormatting) {
data.append('preserve_formatting', '1');
if (options.preserveFormatting !== undefined) {
data.append('preserve_formatting', (0, utils_1.toBoolString)(options.preserveFormatting));
}
if (options.tagHandling) {
if (options.tagHandling !== undefined) {
data.append('tag_handling', options.tagHandling);
}
if (options.outlineDetection === false) {
data.append('outline_detection', '0');
if (options.outlineDetection !== undefined) {
data.append('outline_detection', (0, utils_1.toBoolString)(options.outlineDetection));
}
if (options.nonSplittingTags) {
if (options.nonSplittingTags !== undefined) {
data.append('non_splitting_tags', joinTagList(options.nonSplittingTags));
}
if (options.splittingTags) {
if (options.splittingTags !== undefined) {
data.append('splitting_tags', joinTagList(options.splittingTags));
}
if (options.ignoreTags) {
if (options.ignoreTags !== undefined) {
data.append('ignore_tags', joinTagList(options.ignoreTags));

@@ -301,3 +299,3 @@ }

Authorization: `DeepL-Auth-Key ${authKey}`,
'User-Agent': 'deepl-node/1.7.4',
'User-Agent': 'deepl-node/1.7.5',
...((_a = options === null || options === void 0 ? void 0 : options.headers) !== null && _a !== void 0 ? _a : {}),

@@ -304,0 +302,0 @@ };

@@ -21,1 +21,6 @@ /// <reference types="node" />

export declare function isString(arg: any): arg is string;
/**
* Returns '1' if the given arg is truthy, '0' otherwise.
* @param arg Argument to check.
*/
export declare function toBoolString(arg: any): string;

@@ -9,3 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isString = exports.timeout = exports.streamToString = exports.streamToBuffer = exports.logInfo = exports.logDebug = void 0;
exports.toBoolString = exports.isString = exports.timeout = exports.streamToString = exports.streamToBuffer = exports.logInfo = exports.logDebug = void 0;
const loglevel_1 = __importDefault(require("loglevel"));

@@ -63,1 +63,9 @@ const logger = loglevel_1.default.getLogger('deepl');

exports.isString = isString;
/**
* Returns '1' if the given arg is truthy, '0' otherwise.
* @param arg Argument to check.
*/
function toBoolString(arg) {
return arg ? '1' : '0';
}
exports.toBoolString = toBoolString;
{
"name": "deepl-node",
"description": "deepl-node is the official DeepL Node.js client library",
"version": "1.7.4",
"version": "1.7.5",
"author": "DeepL SE <open-source@deepl.com> (https://www.deepl.com)",

@@ -6,0 +6,0 @@ "license": "MIT",

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