Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Injectify } from '../../definitions/core'
declare const injectify: typeof Injectify
import * as PromisePolyfill from 'promise-polyfill'
import * as Guid from 'guid'
PromisePolyfill._unhandledRejectionFn = (e) => {
if (injectify) {
injectify.error(e.stack)
}
}
export default PromisePolyfill
/**
* Promise-like replacement that allows the handler to check
* whether it's being observed (eg. has .then() or .catch())
*/
interface Result extends Promise {
id: string
}
type Vowed = (
Observed: boolean,
var ATTRS = {
URL_LINK: "data-query",
SPARQL_REF: "data-query-sparql",
ENDPOINT: "data-query-endpoint",
OUTPUT: "data-query-output"
};
var $ = require("jquery");
var linkUtils = require("./shareLink");
var Promise = require("promise-polyfill");
//This lib _requires_ a catch clause (we use just a second arg in the then)
//so disable these warning
Promise._unhandledRejectionFn = function(rejectError) {};
var urlParse = require("url-parse");
module.exports = function(yasguiOptions) {
$(document).ready(function() {
window.yasgui = [];
var yasguiStoryItems = $("[" + ATTRS.URL_LINK + "]");
var count = 0;
function loadEls() {
if (count >= yasguiStoryItems.length) {
//loaded everything, so we're done
} else {
loadEl(yasguiStoryItems[count], 0, count).then(function() {
count++;
loadEls();
});
}
}