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

@php-wasm/util

Package Overview
Dependencies
Maintainers
3
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@php-wasm/util - npm Package Compare versions

Comparing version 0.1.61 to 0.2.0

40

index.js

@@ -43,2 +43,41 @@ // packages/php-wasm/util/src/lib/semaphore.ts

// packages/php-wasm/util/src/lib/join-paths.ts
function joinPaths(...paths) {
let path = paths.join("/");
const isAbsolute = path.charAt(0) === "/";
const trailingSlash = path.substring(path.length - 1) === "/";
path = normalizePathsArray(
path.split("/").filter((p) => !!p),
!isAbsolute
).join("/");
if (!path && !isAbsolute) {
path = ".";
}
if (path && trailingSlash) {
path += "/";
}
return (isAbsolute ? "/" : "") + path;
}
function normalizePathsArray(parts, allowAboveRoot) {
let up = 0;
for (let i = parts.length - 1; i >= 0; i--) {
const last = parts[i];
if (last === ".") {
parts.splice(i, 1);
} else if (last === "..") {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
if (allowAboveRoot) {
for (; up; up--) {
parts.unshift("..");
}
}
return parts;
}
// packages/php-wasm/util/src/lib/php-vars.ts

@@ -81,4 +120,5 @@ var literal = Symbol("literal");

Semaphore,
joinPaths,
phpVar,
phpVars
};

8

package.json
{
"name": "@php-wasm/util",
"version": "0.1.61",
"version": "0.2.0",
"type": "commonjs",

@@ -15,3 +15,7 @@ "typedoc": {

},
"gitHead": "f2cd7382004f7b003904b5db1d33d37fd2b1bfab"
"gitHead": "cd4062de74f7f18058d3f962e124d0fdff78b5a7",
"engines": {
"node": ">=16.15.1",
"npm": ">=8.11.0"
}
}
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