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

code-fns

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-fns - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

30

lib/cjs/tags.js

@@ -131,7 +131,7 @@ "use strict";

function isLevelEquivilant(one, two) {
console.info(`checking if nodes are level equivilant`);
// console.info(`checking if nodes are level equivilant`);
if (one === null || two === null) return false;
if (typeof one === 'string' && typeof two !== 'string' || typeof one !== 'string' && typeof two === 'string') {
console.info(`found nodes to be different types`);
// console.info(`found nodes to be different types`);
return false;

@@ -141,3 +141,3 @@ }

if (typeof one === 'string' && typeof two === 'string') {
console.info(`found nodes to be strings`);
// console.info(`found nodes to be strings`);
return one === two;

@@ -147,10 +147,8 @@ }

if (typeof one !== 'string' && typeof two !== 'string') {
console.info(`found nodes to be code nodes`);
if (one.spans.length !== two.spans.length) return false;
console.info(`found nodes to be the same length`);
// console.info(`found nodes to be code nodes`);
if (one.spans.length !== two.spans.length) return false; // console.info(`found nodes to be the same length`);
return one.spans.every((span, i) => span === two.spans[i]);
}
console.error(one);
console.error(two);
throw new Error('Could not determine equivilance of nodes');

@@ -204,4 +202,4 @@ }

const progress = (l, r) => {
if (r == null) r = l;
console.info(`progressing ${l} and ${r}`);
if (r == null) r = l; // console.info(`progressing ${l} and ${r}`);
const startIndex = index;

@@ -215,4 +213,3 @@

});
index++;
console.info(`now at ${index} in startParsed`);
index++; // console.info(`now at ${index} in startParsed`);
}

@@ -231,4 +228,3 @@

endex++;
console.info(`now at ${endex} in endParsed`);
endex++; // console.info(`now at ${endex} in endParsed`);
}

@@ -240,5 +236,4 @@ };

throw new Error('equivilant nodes should not be null');
}
} // console.info(`nodes were found to be level equivilant`);
console.info(`nodes were found to be level equivilant`);

@@ -258,4 +253,3 @@ if (typeof one === 'string') {

} else {
console.info(`nodes were NOT found to be level equivilant`);
// console.info(`nodes were NOT found to be level equivilant`);
if (typeof one === 'string' && typeof two === 'string') {

@@ -262,0 +256,0 @@ progress(one, two);

@@ -108,7 +108,7 @@ import { createStarryNight, all } from '@wooorm/starry-night';

function isLevelEquivilant(one, two) {
console.info(`checking if nodes are level equivilant`);
// console.info(`checking if nodes are level equivilant`);
if (one === null || two === null) return false;
if (typeof one === 'string' && typeof two !== 'string' || typeof one !== 'string' && typeof two === 'string') {
console.info(`found nodes to be different types`);
// console.info(`found nodes to be different types`);
return false;

@@ -118,3 +118,3 @@ }

if (typeof one === 'string' && typeof two === 'string') {
console.info(`found nodes to be strings`);
// console.info(`found nodes to be strings`);
return one === two;

@@ -124,10 +124,8 @@ }

if (typeof one !== 'string' && typeof two !== 'string') {
console.info(`found nodes to be code nodes`);
if (one.spans.length !== two.spans.length) return false;
console.info(`found nodes to be the same length`);
// console.info(`found nodes to be code nodes`);
if (one.spans.length !== two.spans.length) return false; // console.info(`found nodes to be the same length`);
return one.spans.every((span, i) => span === two.spans[i]);
}
console.error(one);
console.error(two);
throw new Error('Could not determine equivilance of nodes');

@@ -181,4 +179,4 @@ }

const progress = (l, r) => {
if (r == null) r = l;
console.info(`progressing ${l} and ${r}`);
if (r == null) r = l; // console.info(`progressing ${l} and ${r}`);
const startIndex = index;

@@ -192,4 +190,3 @@

});
index++;
console.info(`now at ${index} in startParsed`);
index++; // console.info(`now at ${index} in startParsed`);
}

@@ -208,4 +205,3 @@

endex++;
console.info(`now at ${endex} in endParsed`);
endex++; // console.info(`now at ${endex} in endParsed`);
}

@@ -217,5 +213,4 @@ };

throw new Error('equivilant nodes should not be null');
}
} // console.info(`nodes were found to be level equivilant`);
console.info(`nodes were found to be level equivilant`);

@@ -235,4 +230,3 @@ if (typeof one === 'string') {

} else {
console.info(`nodes were NOT found to be level equivilant`);
// console.info(`nodes were NOT found to be level equivilant`);
if (typeof one === 'string' && typeof two === 'string') {

@@ -239,0 +233,0 @@ progress(one, two);

2

package.json
{
"name": "code-fns",
"version": "0.6.0",
"version": "0.6.1",
"description": "A library for visualizing code.",

@@ -5,0 +5,0 @@ "license": "MIT",

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