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

squishjs

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

squishjs - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

package.json
{
"name": "squishjs",
"version": "0.5.0",
"version": "0.5.1",
"description": "squish & unsquish stuff",

@@ -5,0 +5,0 @@ "scripts": {

@@ -68,3 +68,2 @@ const InternalGameNode = require("./InternalGameNode");

for (const i in originalCoords) {
Math.floor(p.x), Math.round(100 * (p.x - Math.floor(p.x)))
squished[2 * i] = Math.floor(originalCoords[i]);

@@ -71,0 +70,0 @@ squished[(2 * i) + 1] = Math.round(100 * (originalCoords[i] - Math.floor(originalCoords[i])));

const rectangle = (startX, startY, width, height) => {
return [
startX, startY,
startX + width, startY,
startX + width, startY + height,
startX, startY + height,
startX, startY,
[startX, startY],
[startX + width, startY],
[startX + width, startY + height],
[startX, startY + height],
[startX, startY],
];

@@ -9,0 +9,0 @@ };

@@ -18,2 +18,11 @@ const { squish, unsquish } = require('../src/squish');

assert(!!unsquished[key] === expectedValue);
} else if (key === 'coordinates2d') {
if (!preSquish.coordinates2d) {
assert(!unsquished.coordinates2d);
} else {
const preSquishFlat = preSquish.coordinates2d.flat();
for (let i = 0; i < unsquished.coordinates2d.length; i++) {
assert(preSquishFlat[i] === unsquished.coordinates2d[i]);
}
}
} else if (key === 'input' || key == 'text') {

@@ -20,0 +29,0 @@ // TODO: Handle all of this in a more generic way

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