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

markmap-view

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-view - npm Package Compare versions

Comparing version 0.15.0 to 0.15.3-alpha.1

33

dist/browser/index.js

@@ -1,6 +0,6 @@

/*! markmap-view v0.15.0 | MIT License */
/*! markmap-view v0.15.3-alpha.1+fb5e189 | MIT License */
(function (exports, d3) {
'use strict';
/*! markmap-common v0.15.0 | MIT License */
/*! markmap-common v0.15.3-alpha.1+fb5e189 | MIT License */
function _extends$1() {

@@ -30,14 +30,19 @@ _extends$1 = Object.assign ? Object.assign.bind() : function (target) {

}
getFastestProvider(path = testPath) {
return Promise.any(Object.entries(this.providers).map(async ([name, factory]) => {
const res = await fetch(factory(path));
if (!res.ok) {
throw res;
}
await res.text();
return name;
}));
getFastestProvider(timeout = 5e3, path = testPath) {
return new Promise((resolve, reject) => {
Promise.all(Object.entries(this.providers).map(async ([name, factory]) => {
try {
const res = await fetch(factory(path));
if (!res.ok) {
throw res;
}
await res.text();
resolve(name);
} catch (_unused) {}
})).then(() => reject(new Error("All providers failed")));
setTimeout(reject, timeout, new Error("Timed out"));
});
}
async findFastestProvider() {
this.provider = await this.getFastestProvider();
async findFastestProvider(timeout) {
this.provider = await this.getFastestProvider(timeout);
return this.provider;

@@ -1234,3 +1239,3 @@ }

let recursive = this.options.toggleRecursively;
if (e.ctrlKey) recursive = !recursive;
if (isMacintosh ? e.metaKey : e.ctrlKey) recursive = !recursive;
this.toggleNode(d.data, recursive);

@@ -1237,0 +1242,0 @@ };

@@ -1,2 +0,2 @@

/*! markmap-view v0.15.0 | MIT License */
/*! markmap-view v0.15.3-alpha.1+fb5e189 | MIT License */
import { Hook, getId, addClass, walkTree, childSelector, noop } from 'markmap-common';

@@ -873,3 +873,3 @@ export { loadCSS, loadJS } from 'markmap-common';

let recursive = this.options.toggleRecursively;
if (e.ctrlKey) recursive = !recursive;
if (isMacintosh ? e.metaKey : e.ctrlKey) recursive = !recursive;
this.toggleNode(d.data, recursive);

@@ -876,0 +876,0 @@ };

{
"name": "markmap-view",
"version": "0.15.0",
"version": "0.15.3-alpha.1+fb5e189",
"description": "View markmaps in browser",

@@ -49,3 +49,3 @@ "author": "Gerald <gera2ld@live.com>",

"@types/d3-flextree": "^2.1.1",
"markmap-common": "0.15.0"
"markmap-common": "0.15.3-alpha.1+fb5e189"
},

@@ -55,3 +55,3 @@ "peerDependencies": {

},
"gitHead": "9c13bae5e28346ec613362046a023839ef64538b"
"gitHead": "fb5e1891c9cfda0426feb8f43555f32c56648f10"
}
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