Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ensureOriginOnExports(executed, name) {
var target = executed;
var key = void 0;
var exportedValue = void 0;
if (target.__useDefault) {
target = target['default'];
}
Origin.set(target, new Origin(name, 'default'));
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(name, key));
}
}
return executed;
}
export function ensureOriginOnExports(moduleExports: any, moduleId: string) {
let target = moduleExports;
let key;
let exportedValue;
if (target.__useDefault) {
target = target.default;
}
Origin.set(target, new Origin(moduleId, 'default'));
if (typeof target === 'object') {
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(moduleId, key));
}
}
}
return moduleExports;
}
export function ensureOriginOnExports(moduleExports, moduleId) {
let target = moduleExports;
let key;
let exportedValue;
if (target.__useDefault) {
target = target.default;
}
Origin.set(target, new Origin(moduleId, 'default'));
if (typeof target === 'object') {
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(moduleId, key));
}
}
}
return moduleExports;
}
/**
let target = moduleExports;
let key;
let exportedValue;
if (target.__useDefault) {
target = target.default;
}
Origin.set(target, new Origin(moduleId, 'default'));
if (typeof target === 'object') {
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(moduleId, key));
}
}
}
return moduleExports;
}
export function ensureOriginOnExports(moduleExports, moduleId) {
var target = moduleExports;
var key;
var exportedValue;
if (target.__useDefault) {
target = target.default;
}
Origin.set(target, new Origin(moduleId, 'default'));
if (typeof target === 'object') {
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(moduleId, key));
}
}
}
return moduleExports;
}
/**
} else {
if (m.__moduleName) {
moduleName = m.__moduleName;
if (m[moduleName] && (typeof m[moduleName]) == 'function') model = new m[m.__moduleName]();
}
}
model.getViewStrategy = function() {
return new CustomViewStrategy(nid);
};
var r = function() {
return model;
};
Origin.set(r, new Origin(nid, 'default'));
resolve(r);
});
});
function ensureOriginOnExports(executed, name) {
let target = executed;
let key;
let exportedValue;
if (target.__useDefault) {
target = target['default'];
}
Origin.set(target, new Origin(name, 'default'));
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(name, key));
}
}
return executed;
}
let target = executed;
let key;
let exportedValue;
if (target.__useDefault) {
target = target.default;
}
Origin.set(target, new Origin(moduleId, 'default'));
if (typeof target === 'object') {
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(moduleId, key));
}
}
}
return executed;
}
function ensureOriginOnExports(executed, name) {
let target = executed;
let key;
let exportedValue;
if (target.__useDefault) {
target = target['default'];
}
Origin.set(target, new Origin(name, 'default'));
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(name, key));
}
}
return executed;
}
function ensureOriginOnExports(executed, name) {
let target = executed;
let key;
let exportedValue;
if (target.__useDefault) {
target = target['default'];
}
Origin.set(target, new Origin(name, 'default'));
for (key in target) {
exportedValue = target[key];
if (typeof exportedValue === 'function') {
Origin.set(exportedValue, new Origin(name, key));
}
}
return executed;
}