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

markmap-common

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-common - npm Package Compare versions

Comparing version 0.14.0 to 0.14.2-alpha.0

46

dist/index.esm.js

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

/*! markmap-common v0.14.0 | MIT License */
/*! markmap-common v0.14.2-alpha.0+518591b | MIT License */
class Hook {

@@ -270,26 +270,36 @@ constructor() {

function loadJSItem(item, context) {
if (item.type === 'script') {
return new Promise((resolve, reject) => {
var _item$data;
async function loadJSItem(item, context) {
if (!item.loaded) {
if (item.type === 'script') {
item.loaded = new Promise((resolve, reject) => {
var _item$data;
document.head.append(createElement('script', _extends({}, item.data, {
onload: resolve,
onerror: reject
}))); // Run inline script synchronously
document.head.append(createElement('script', _extends({}, item.data, {
onload: resolve,
onerror: reject
}))); // Run inline script synchronously
if (!((_item$data = item.data) != null && _item$data.src)) resolve();
});
if (!((_item$data = item.data) != null && _item$data.src)) resolve(undefined);
}).then(() => {
item.loaded = true;
});
}
if (item.type === 'iife') {
const {
fn,
getParams
} = item.data;
fn(...((getParams == null ? void 0 : getParams(context)) || []));
item.loaded = true;
}
}
if (item.type === 'iife') {
const {
fn,
getParams
} = item.data;
fn(...((getParams == null ? void 0 : getParams(context)) || []));
}
await item.loaded;
}
function loadCSSItem(item) {
if (item.loaded) return;
item.loaded = true;
if (item.type === 'style') {

@@ -296,0 +306,0 @@ document.head.append(createElement('style', {

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

/*! markmap-common v0.14.0 | MIT License */
/*! markmap-common v0.14.2-alpha.0+518591b | MIT License */
'use strict';

@@ -274,26 +274,36 @@

function loadJSItem(item, context) {
if (item.type === 'script') {
return new Promise((resolve, reject) => {
var _item$data;
async function loadJSItem(item, context) {
if (!item.loaded) {
if (item.type === 'script') {
item.loaded = new Promise((resolve, reject) => {
var _item$data;
document.head.append(createElement('script', _extends({}, item.data, {
onload: resolve,
onerror: reject
}))); // Run inline script synchronously
document.head.append(createElement('script', _extends({}, item.data, {
onload: resolve,
onerror: reject
}))); // Run inline script synchronously
if (!((_item$data = item.data) != null && _item$data.src)) resolve();
});
if (!((_item$data = item.data) != null && _item$data.src)) resolve(undefined);
}).then(() => {
item.loaded = true;
});
}
if (item.type === 'iife') {
const {
fn,
getParams
} = item.data;
fn(...((getParams == null ? void 0 : getParams(context)) || []));
item.loaded = true;
}
}
if (item.type === 'iife') {
const {
fn,
getParams
} = item.data;
fn(...((getParams == null ? void 0 : getParams(context)) || []));
}
await item.loaded;
}
function loadCSSItem(item) {
if (item.loaded) return;
item.loaded = true;
if (item.type === 'style') {

@@ -300,0 +310,0 @@ document.head.append(createElement('style', {

{
"name": "markmap-common",
"version": "0.14.0",
"version": "0.14.2-alpha.0+518591b",
"description": "",

@@ -27,3 +27,3 @@ "author": "",

},
"gitHead": "2d6a50992256a2d2e4d945c2c075ddc42d6ccb0d"
"gitHead": "518591b51ec505addc238f00be97a280af7341f3"
}

@@ -60,2 +60,3 @@ export interface IHierarchy<T> {

type: 'script';
loaded?: Promise<void> | boolean;
data: {

@@ -70,2 +71,3 @@ src?: string;

type: 'iife';
loaded?: Promise<void> | boolean;
data: {

@@ -79,2 +81,3 @@ fn: (...args: unknown[]) => void;

type: 'style';
loaded?: boolean;
data: string;

@@ -84,2 +87,3 @@ };

type: 'stylesheet';
loaded?: boolean;
data: {

@@ -86,0 +90,0 @@ href: string;

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