packages/uswds-core/src/js/polyfills/svg4everybody.js
Function svg4everybody
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function svg4everybody(rawopts) {
function oninterval() {
// if all <use>s in the array are being bypassed, don't proceed.
if (
numberOfSvgUseElementsToBypass &&
Function oninterval
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function oninterval() {
// if all <use>s in the array are being bypassed, don't proceed.
if (
numberOfSvgUseElementsToBypass &&
uses.length - numberOfSvgUseElementsToBypass <= 0
Function embed
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function embed(parent, svg, target, use) {
// if the target exists
if (target) {
// create a document fragment to hold the contents of the target
var fragment = document.createDocumentFragment(),
Avoid deeply nested control flow statements. Open
Open
if (url.length) {
// get the cached xhr request
var xhr = requests[url];
// ensure the xhr request exists
xhr ||