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

mobiledoc-dom-renderer

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobiledoc-dom-renderer - npm Package Compare versions

Comparing version 0.1.16 to 0.1.17

189

dist/global/mobiledoc-dom-renderer.js
;(function() {
var define, requireModule, require, requirejs;
(function() {
'use strict';

@@ -10,3 +10,3 @@ var _isArray;

_isArray = function (x) {
return Object.prototype.toString.call(x) === "[object Array]";
return Object.prototype.toString.call(x) === '[object Array]';
};

@@ -20,15 +20,9 @@ } else {

var FAILED = false;
var LOADED = true;
var uuid = 0;
function tryFinally(tryable, finalizer) {
try {
return tryable();
} finally {
finalizer();
}
}
function unsupportedModule(length) {
throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `" + length + "` arguments to define`");
throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' +
length + '` arguments to define`');
}

@@ -38,13 +32,66 @@

function Module(name, deps, callback, exports) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.exports = exports || { };
this.callback = callback;
this.state = undefined;
function Module(name, deps, callback) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.module = { exports: {} };
this.callback = callback;
this.state = undefined;
this._require = undefined;
this.finalized = false;
this.hasExportsAsDep = false;
}
Module.prototype.makeDefaultExport = function() {
var exports = this.module.exports;
if (exports !== null &&
(typeof exports === 'object' || typeof exports === 'function') &&
exports['default'] === undefined) {
exports['default'] = exports;
}
};
Module.prototype.exports = function(reifiedDeps) {
if (this.finalized) {
return this.module.exports;
} else {
var result = this.callback.apply(this, reifiedDeps);
if (!(this.hasExportsAsDep && result === undefined)) {
this.module.exports = result;
}
this.makeDefaultExport();
this.finalized = true;
return this.module.exports;
}
};
Module.prototype.unsee = function() {
this.finalized = false;
this.state = undefined;
this.module = { exports: {}};
};
Module.prototype.reify = function() {
var deps = this.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
this.hasExportsAsDep = true;
reified[i] = this.module.exports;
} else if (dep === 'require') {
reified[i] = this.makeRequire();
} else if (dep === 'module') {
reified[i] = this.module;
} else {
reified[i] = findModule(resolve(dep, this.name), this.name).module.exports;
}
}
return reified;
};
Module.prototype.makeRequire = function() {

@@ -56,4 +103,11 @@ var name = this.name;

});
}
};
Module.prototype.build = function() {
if (this.state === FAILED) { return; }
this.state = FAILED;
this.exports(this.reify());
this.state = LOADED;
};
define = function(name, deps, callback) {

@@ -85,88 +139,24 @@ if (arguments.length < 2) {

function reify(mod, name, seen) {
var deps = mod.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
// TODO: new Module
// TODO: seen refactor
var module = { };
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
module.exports = reified[i] = seen;
} else if (dep === 'require') {
reified[i] = mod.makeRequire();
} else if (dep === 'module') {
mod.exports = seen;
module = reified[i] = mod;
} else {
reified[i] = requireFrom(resolve(dep, name), name);
}
}
return {
deps: reified,
module: module
};
function missingModule(name, referrer) {
throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`');
}
function requireFrom(name, origin) {
var mod = registry[name];
if (!mod) {
throw new Error('Could not find module `' + name + '` imported from `' + origin + '`');
}
return require(name);
}
requirejs = require = requireModule = function(name) {
return findModule(name, '(require)').module.exports;
};
function missingModule(name) {
throw new Error('Could not find module ' + name);
}
requirejs = require = requireModule = function(name) {
function findModule(name, referrer) {
var mod = registry[name];
if (mod && mod.callback instanceof Alias) {
mod = registry[mod.callback.name];
while (mod && mod.callback instanceof Alias) {
name = mod.callback.name;
mod = registry[name];
}
if (!mod) { missingModule(name); }
if (!mod) { missingModule(name, referrer); }
if (mod.state !== FAILED &&
seen.hasOwnProperty(name)) {
return seen[name];
}
mod.build();
return mod;
}
var reified;
var module;
var loaded = false;
seen[name] = { }; // placeholder for run-time cycles
tryFinally(function() {
reified = reify(mod, name, seen[name]);
module = mod.callback.apply(this, reified.deps);
loaded = true;
}, function() {
if (!loaded) {
mod.state = FAILED;
}
});
var obj;
if (module === undefined && reified.module.exports) {
obj = reified.module.exports;
} else {
obj = seen[name] = module;
}
if (obj !== null &&
(typeof obj === 'object' || typeof obj === 'function') &&
obj['default'] === undefined) {
obj['default'] = obj;
}
return (seen[name] = obj);
};
function resolve(child, name) {

@@ -197,3 +187,3 @@ if (child.charAt(0) !== '.') { return child; }

requirejs.unsee = function(moduleName) {
delete seen[moduleName];
findModule(moduleName, '(unsee)').unsee();
};

@@ -203,3 +193,3 @@

requirejs.entries = requirejs._eak_seen = registry = {};
seen = state = {};
seen = {};
};

@@ -481,2 +471,3 @@ })();

require("mobiledoc-dom-renderer")["registerGlobal"](window, document);
})();//# sourceMappingURL=mobiledoc-dom-renderer.map
})();
//# sourceMappingURL=mobiledoc-dom-renderer.map
var define, requireModule, require, requirejs;
(function() {
'use strict';

@@ -8,3 +9,3 @@ var _isArray;

_isArray = function (x) {
return Object.prototype.toString.call(x) === "[object Array]";
return Object.prototype.toString.call(x) === '[object Array]';
};

@@ -18,15 +19,9 @@ } else {

var FAILED = false;
var LOADED = true;
var uuid = 0;
function tryFinally(tryable, finalizer) {
try {
return tryable();
} finally {
finalizer();
}
}
function unsupportedModule(length) {
throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `" + length + "` arguments to define`");
throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' +
length + '` arguments to define`');
}

@@ -36,13 +31,66 @@

function Module(name, deps, callback, exports) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.exports = exports || { };
this.callback = callback;
this.state = undefined;
function Module(name, deps, callback) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.module = { exports: {} };
this.callback = callback;
this.state = undefined;
this._require = undefined;
this.finalized = false;
this.hasExportsAsDep = false;
}
Module.prototype.makeDefaultExport = function() {
var exports = this.module.exports;
if (exports !== null &&
(typeof exports === 'object' || typeof exports === 'function') &&
exports['default'] === undefined) {
exports['default'] = exports;
}
};
Module.prototype.exports = function(reifiedDeps) {
if (this.finalized) {
return this.module.exports;
} else {
var result = this.callback.apply(this, reifiedDeps);
if (!(this.hasExportsAsDep && result === undefined)) {
this.module.exports = result;
}
this.makeDefaultExport();
this.finalized = true;
return this.module.exports;
}
};
Module.prototype.unsee = function() {
this.finalized = false;
this.state = undefined;
this.module = { exports: {}};
};
Module.prototype.reify = function() {
var deps = this.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
this.hasExportsAsDep = true;
reified[i] = this.module.exports;
} else if (dep === 'require') {
reified[i] = this.makeRequire();
} else if (dep === 'module') {
reified[i] = this.module;
} else {
reified[i] = findModule(resolve(dep, this.name), this.name).module.exports;
}
}
return reified;
};
Module.prototype.makeRequire = function() {

@@ -54,4 +102,11 @@ var name = this.name;

});
}
};
Module.prototype.build = function() {
if (this.state === FAILED) { return; }
this.state = FAILED;
this.exports(this.reify());
this.state = LOADED;
};
define = function(name, deps, callback) {

@@ -83,88 +138,24 @@ if (arguments.length < 2) {

function reify(mod, name, seen) {
var deps = mod.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
// TODO: new Module
// TODO: seen refactor
var module = { };
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
module.exports = reified[i] = seen;
} else if (dep === 'require') {
reified[i] = mod.makeRequire();
} else if (dep === 'module') {
mod.exports = seen;
module = reified[i] = mod;
} else {
reified[i] = requireFrom(resolve(dep, name), name);
}
}
return {
deps: reified,
module: module
};
function missingModule(name, referrer) {
throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`');
}
function requireFrom(name, origin) {
var mod = registry[name];
if (!mod) {
throw new Error('Could not find module `' + name + '` imported from `' + origin + '`');
}
return require(name);
}
requirejs = require = requireModule = function(name) {
return findModule(name, '(require)').module.exports;
};
function missingModule(name) {
throw new Error('Could not find module ' + name);
}
requirejs = require = requireModule = function(name) {
function findModule(name, referrer) {
var mod = registry[name];
if (mod && mod.callback instanceof Alias) {
mod = registry[mod.callback.name];
while (mod && mod.callback instanceof Alias) {
name = mod.callback.name;
mod = registry[name];
}
if (!mod) { missingModule(name); }
if (!mod) { missingModule(name, referrer); }
if (mod.state !== FAILED &&
seen.hasOwnProperty(name)) {
return seen[name];
}
mod.build();
return mod;
}
var reified;
var module;
var loaded = false;
seen[name] = { }; // placeholder for run-time cycles
tryFinally(function() {
reified = reify(mod, name, seen[name]);
module = mod.callback.apply(this, reified.deps);
loaded = true;
}, function() {
if (!loaded) {
mod.state = FAILED;
}
});
var obj;
if (module === undefined && reified.module.exports) {
obj = reified.module.exports;
} else {
obj = seen[name] = module;
}
if (obj !== null &&
(typeof obj === 'object' || typeof obj === 'function') &&
obj['default'] === undefined) {
obj['default'] = obj;
}
return (seen[name] = obj);
};
function resolve(child, name) {

@@ -195,3 +186,3 @@ if (child.charAt(0) !== '.') { return child; }

requirejs.unsee = function(moduleName) {
delete seen[moduleName];
findModule(moduleName, '(unsee)').unsee();
};

@@ -201,4 +192,4 @@

requirejs.entries = requirejs._eak_seen = registry = {};
seen = state = {};
seen = {};
};
})();
{
"name": "mobiledoc-dom-renderer",
"version": "0.1.16",
"version": "0.1.17",
"description": "Renders Mobiledoc input to DOM output",

@@ -14,4 +14,4 @@ "scripts": {

"keywords": [
"ember-addon",
"mobiledoc",
"mobiledoc-renderer",
"content-kit"

@@ -37,9 +37,3 @@ ],

},
"dependencies": {
"broccoli-funnel": "^0.2.8"
},
"main": "dist/commonjs/mobiledoc-dom-renderer/index.js",
"ember-addon": {
"main": "index.js"
}
"main": "dist/commonjs/mobiledoc-dom-renderer/index.js"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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