Plato on Github
Report Home
node_modules\atropa-removeNodeByReference\src\atropa-removeNodeByReference.js
Maintainability
77.39
Lines of code
50
Difficulty
9.09
Estimated Errors
0.12
Function weight
By Complexity
By SLOC
/// <reference path="../docs/vsdoc/OpenLayersAll.js"/> var atropa = require('atropa-header'); /*jslint indent: 4, maxerr: 50, white: true, browser: true, devel: true, plusplus: true, regexp: true */ /*global atropa */ // end header atropa.requires( 'removeNodeByReference', function () { "use strict"; if(document === undefined) { return false; } return true; } ); /** * Removes DOM Nodes. * @author <a href="mailto:matthewkastor@gmail.com"> * Matthew Christopher Kastor-Inare III </a><br /> * ☭ Hial Atropa!! ☭ * @version 20120909 * @function * @param {DOM Node} elementReference A reference to the DOM Node you want * to remove. */ atropa.removeNodeByReference = function (elementReference) { "use strict"; atropa.supportCheck('removeNodeByReference'); if(elementReference !== undefined) { elementReference.parentNode.removeChild(elementReference); } }; while(atropa.data.requirements.length > 0) { atropa.data.requirements.pop()(); } module.exports = atropa;