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

@appolo/utils

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appolo/utils - npm Package Compare versions

Comparing version 8.0.20 to 8.0.21

9

lib/strings.js

@@ -25,2 +25,11 @@ "use strict";

}
static replaceFormatJson(str, data) {
str = (str || "").replace(/\"\$\{([\w\.\_\:]*)\}\"/gm, (_m, key) => {
let spread = key.split(":"), type = spread[1] || "";
key = spread[0];
let value = data.hasOwnProperty(key) ? ((!data[key] && data[key] !== false) ? "" : data[key]) : "";
return type == "number" ? (parseFloat(value) || 0).toString() : (type == "boolean" ? Boolean(value).toString() : `"${value}"`);
});
return Strings.replaceFormat(str, data);
}
static sanitizeString(str) {

@@ -27,0 +36,0 @@ // u200B is the hex equivalent of unicode 8203 and it will fuck with our encoding function in the ad server

@@ -29,2 +29,18 @@ import {Functions} from "../index";

public static replaceFormatJson(str: string, data: any): string {
str = (str || "").replace(/\"\$\{([\w\.\_\:]*)\}\"/gm, (_m, key) => {
let spread = key.split(":"),
type = spread[1] || "";
key = spread[0];
let value = data.hasOwnProperty(key) ? ((!data[key] && data[key] !== false) ? "" : data[key]) : "";
return type == "number" ? (parseFloat(value) || 0).toString() : (type == "boolean" ? Boolean(value).toString() : `"${value}"`)
});
return Strings.replaceFormat(str, data)
}
public static sanitizeString(str: string): string {

@@ -31,0 +47,0 @@ // u200B is the hex equivalent of unicode 8203 and it will fuck with our encoding function in the ad server

2

package.json

@@ -20,3 +20,3 @@ {

"main": "./index.js",
"version": "8.0.20",
"version": "8.0.21",
"license": "MIT",

@@ -23,0 +23,0 @@ "repository": {

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