New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ts-commons

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-commons - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

.nyc_output/548a813c4a07ef15510ad16107e36edf.json

11

dist/utils/string.utils.d.ts

@@ -265,3 +265,14 @@ export declare class StringUtils {

static replaceAll(str: string, searchValue: string, replacer: string): string;
/**
* Joins the elements of the provided array into a single String
* @param array the array of values to join together, may be null
* @param separator the separator character to use, null treated as ""
* @returns the joined String
* @example StringUtils.join([], *) = "";
* @example StringUtils.join(["a", "b", "c"], null) = "abc"
* @example StringUtils.join(["a", "b", "c"], "-") = "a-b-c"
* @example StringUtils.join([1, 2, 3], "-") = "1-2-3"
*/
static join<T>(array: T[], separator?: string): string;
private static escapeRegExp;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringUtils = void 0;
var array_utils_1 = require("./array.utils");
var number_utils_1 = require("./number.utils");

@@ -484,2 +485,30 @@ var object_utils_1 = require("./object.utils");

};
/**
* Joins the elements of the provided array into a single String
* @param array the array of values to join together, may be null
* @param separator the separator character to use, null treated as ""
* @returns the joined String
* @example StringUtils.join([], *) = "";
* @example StringUtils.join(["a", "b", "c"], null) = "abc"
* @example StringUtils.join(["a", "b", "c"], "-") = "a-b-c"
* @example StringUtils.join([1, 2, 3], "-") = "1-2-3"
*/
StringUtils.join = function (array, separator) {
if (separator === void 0) { separator = ""; }
if (array_utils_1.ArrayUtils.isEmpty(array)) {
return "";
}
var useSeparator = this.isEmpty(separator) ? "" : separator;
var result;
for (var index = 0; index < array.length; index++) {
var element = array[index] + "";
if (index === 0) {
result = element;
}
else {
result = result + useSeparator + element;
}
}
return result;
};
StringUtils.escapeRegExp = function (str) {

@@ -486,0 +515,0 @@ return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");

2

package.json
{
"name": "ts-commons",
"version": "1.0.27",
"version": "1.0.28",
"description": "common methods for typescript",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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