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

@sap-cloud-sdk/util

Package Overview
Dependencies
Maintainers
6
Versions
2440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-cloud-sdk/util - npm Package Compare versions

Comparing version 1.18.1-alpha.7 to 1.18.1-alpha.23

11

dist/array.d.ts

@@ -1,14 +0,5 @@

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**
* Flatten a multidimensional array
* @param arr Multidimensional array to be flattened
*
* @returns Flattened array
*/
export declare function flat<T>(arr: T[][]): T[];
/**
* Remove all duplicates from array
* @param words Array of strings that might contain duplicates
* @param words - Array of strings that might contain duplicates
*

@@ -15,0 +6,0 @@ * @returns Array of unique strings

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
var __spreadArrays = (this && this.__spreadArrays) || function () {

@@ -13,8 +10,3 @@ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;

Object.defineProperty(exports, "__esModule", { value: true });
/**
* Flatten a multidimensional array
* @param arr Multidimensional array to be flattened
*
* @returns Flattened array
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function flat(arr) {

@@ -29,3 +21,3 @@ return arr.reduce(function (flattened, subArr) {

* Remove all duplicates from array
* @param words Array of strings that might contain duplicates
* @param words - Array of strings that might contain duplicates
*

@@ -32,0 +24,0 @@ * @returns Array of unique strings

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
export declare const VALUE_IS_UNDEFINED = "VALUE_IS_UNDEFINED";
//# sourceMappingURL=constants.d.ts.map

5

dist/constants.js
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
// This value is defined to _defaultServicePath, if no service path is found in the parsed metadata
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
exports.VALUE_IS_UNDEFINED = 'VALUE_IS_UNDEFINED';
//# sourceMappingURL=constants.js.map

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**
* Creates a new error using the provided message and appends the causes stacktrace to the new error's stacktrace.
*
* @param message The message of the new error.
* @param cause The original error.
* @returns A new error instance.
*/
export declare function errorWithCause(message: string, cause: Error): Error;
//# sourceMappingURL=error.d.ts.map
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Creates a new error using the provided message and appends the causes stacktrace to the new error's stacktrace.
*
* @param message The message of the new error.
* @param cause The original error.
* @returns A new error instance.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function errorWithCause(message, cause) {
var newError = new Error(message);
// stack is a non-standard property according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types
// Stack is a non-standard property according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types
if (newError.stack && cause.stack) {

@@ -17,0 +8,0 @@ newError.stack = newError.stack + '\nCaused by:\n' + cause.stack;

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
export declare function findProjectRoot(path: string, lastPath?: string): string;
//# sourceMappingURL=fs.d.ts.map
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,0 +4,0 @@ var fs_1 = require("fs");

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
export * from './array';

@@ -5,0 +2,0 @@ export * from './constants';

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function __export(m) {

@@ -6,0 +4,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
import { Logger } from 'winston';

@@ -39,3 +36,3 @@ /**

*
* @param messageContext Either a key for the message context of all messages produced by the logger or an object with additional keys to set in the message.
* @param messageContext - Either a key for the message context of all messages produced by the logger or an object with additional keys to set in the message.
* @returns A newly created or an already existing logger for the given context.

@@ -46,3 +43,3 @@ */

* Get logger for a given message context, if avilable.
* @param messageContext A key for the message context of all messages produced by the logger
* @param messageContext - A key for the message context of all messages produced by the logger
* @returns The logger for the given messageContext if it was created before

@@ -54,4 +51,4 @@ */

* E. g., to set the log level for the destination accessor module of the SDK to _debug_, simply call `setLogLevel('debug', 'destination-acessor')`.
* @param level level to set the logger to
* @param messageContextOrLogger Message context of the logger to change the log level for or the logger itself
* @param level - level to set the logger to
* @param messageContextOrLogger - Message context of the logger to change the log level for or the logger itself
*/

@@ -58,0 +55,0 @@ export declare function setLogLevel(level: LogLevel, messageContextOrLogger?: string | Logger): void;

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
var __assign = (this && this.__assign) || function () {

@@ -76,3 +74,3 @@ __assign = Object.assign || function(t) {

*
* @param messageContext Either a key for the message context of all messages produced by the logger or an object with additional keys to set in the message.
* @param messageContext - Either a key for the message context of all messages produced by the logger or an object with additional keys to set in the message.
* @returns A newly created or an already existing logger for the given context.

@@ -92,3 +90,3 @@ */

* Get logger for a given message context, if avilable.
* @param messageContext A key for the message context of all messages produced by the logger
* @param messageContext - A key for the message context of all messages produced by the logger
* @returns The logger for the given messageContext if it was created before

@@ -106,4 +104,4 @@ */

* E. g., to set the log level for the destination accessor module of the SDK to _debug_, simply call `setLogLevel('debug', 'destination-acessor')`.
* @param level level to set the logger to
* @param messageContextOrLogger Message context of the logger to change the log level for or the logger itself
* @param level - level to set the logger to
* @param messageContextOrLogger - Message context of the logger to change the log level for or the logger itself
*/

@@ -110,0 +108,0 @@ function setLogLevel(level, messageContextOrLogger) {

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
export * from './kibana';
export * from './local';
//# sourceMappingURL=index.d.ts.map
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function __export(m) {

@@ -6,0 +4,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**

@@ -5,0 +2,0 @@ * Format for logging in Kibana.

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
var __assign = (this && this.__assign) || function () {

@@ -6,0 +4,0 @@ __assign = Object.assign || function(t) {

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**

@@ -5,0 +2,0 @@ * Format for local logging.

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
var __assign = (this && this.__assign) || function () {

@@ -6,0 +4,0 @@ __assign = Object.assign || function(t) {

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
export * from './cloud-sdk-logger';
export * from './format';
//# sourceMappingURL=index.d.ts.map
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function __export(m) {

@@ -6,0 +4,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
import { MapType } from './types';

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

*
* @param obj The object to be checked.
* @param properties Chained properties.
* @param obj - The object to be checked.
* @param properties - Chained properties.
* @returns True if the property chain leads to a truthy value, false otherwise.

@@ -18,5 +15,5 @@ */

*
* @param key The key to associate with the given value.
* @param value The value to associate with the given key.
* @param obj The object on which to create the association.
* @param key - The key to associate with the given value.
* @param value - The value to associate with the given key.
* @param obj - The object on which to create the association.
* @returns A copy of the input object with the new key-value pair if the value is neither null nor undefined.

@@ -28,4 +25,4 @@ */

*
* @param a The object to merge into.
* @param b The object which to merge into a.
* @param a - The object to merge into.
* @param b - The object which to merge into a.
* @returns A copy of the merge(a, b) or a if b is undefined or null.

@@ -39,4 +36,4 @@ */

*
* @param keyMapping An object mapping keys of the input object to keys of the output object.
* @param obj The input object.
* @param keyMapping - An object mapping keys of the input object to keys of the output object.
* @param obj - The input object.
* @returns An object with renamed keys.

@@ -43,0 +40,0 @@ */

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
var __assign = (this && this.__assign) || function () {

@@ -28,4 +26,4 @@ __assign = Object.assign || function(t) {

*
* @param obj The object to be checked.
* @param properties Chained properties.
* @param obj - The object to be checked.
* @param properties - Chained properties.
* @returns True if the property chain leads to a truthy value, false otherwise.

@@ -51,5 +49,5 @@ */

*
* @param key The key to associate with the given value.
* @param value The value to associate with the given key.
* @param obj The object on which to create the association.
* @param key - The key to associate with the given value.
* @param value - The value to associate with the given key.
* @param obj - The object on which to create the association.
* @returns A copy of the input object with the new key-value pair if the value is neither null nor undefined.

@@ -66,4 +64,4 @@ */

*
* @param a The object to merge into.
* @param b The object which to merge into a.
* @param a - The object to merge into.
* @param b - The object which to merge into a.
* @returns A copy of the merge(a, b) or a if b is undefined or null.

@@ -82,4 +80,4 @@ */

*
* @param keyMapping An object mapping keys of the input object to keys of the output object.
* @param obj The input object.
* @param keyMapping - An object mapping keys of the input object to keys of the output object.
* @param obj - The input object.
* @returns An object with renamed keys.

@@ -86,0 +84,0 @@ */

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

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**
* Works similar to Ramdas pipe function, but works on promises, which allows using async functions.
*
* @param fns The functions to be chained.
* @param start The value passed to the function created by pipings fns.
*/
export declare const asyncPipe: (...fns: any[]) => (start: any) => Promise<any>;
//# sourceMappingURL=pipe.d.ts.map
"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Works similar to Ramdas pipe function, but works on promises, which allows using async functions.
*
* @param fns The functions to be chained.
* @param start The value passed to the function created by pipings fns.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
exports.asyncPipe = function () {

@@ -13,0 +5,0 @@ var fns = [];

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

/*!
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**
* Encodes the given string in base64.
*
* @param str Input string.
* @returns Base64 string.
*/
export declare function encodeBase64(str: string): string;
//# sourceMappingURL=string.d.ts.map
"use strict";
/*!
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Encodes the given string in base64.
*
* @param str Input string.
* @returns Base64 string.
*/
/* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */
function encodeBase64(str) {

@@ -13,0 +5,0 @@ return Buffer.from(str).toString('base64');

@@ -1,7 +0,1 @@

/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
/**
* @hidden
*/
export interface MapType<T> {

@@ -8,0 +2,0 @@ [key: string]: T;

"use strict";
/*!
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
{
"name": "@sap-cloud-sdk/util",
"version": "1.18.1-alpha.7+92bef01",
"version": "1.18.1-alpha.23+728e46e",
"description": "SAP Cloud SDK for JavaScript general utilities",
"homepage": "https://sap.com/cloud-sdk",
"homepage": "https://community.sap.com/topics/cloud-sdk",
"license": "Apache-2.0",

@@ -31,5 +31,3 @@ "keywords": [

"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --config ./jest-local.json",
"test:watch-debug": "node --inspect-brk node_modules/.bin/jest --watch --runInBand --config ./jest-local.json",
"tslint": "npx tslint \"**/*.ts\" -e \"**/node_modules/**\" -e \"**/*.d.ts\"",
"tslint:fix": "npm run tslint -- --fix"
"test:watch-debug": "node --inspect-brk node_modules/.bin/jest --watch --runInBand --config ./jest-local.json"
},

@@ -48,3 +46,3 @@ "dependencies": {

},
"gitHead": "92bef0165a6a273021d102d9da8bff9fc3f9d85c"
"gitHead": "728e46e271c31f8e401e2223f9a07c5d7c8e67b3"
}

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

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

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

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

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

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