packages/extension-map/doc/webpacks/shexmap-webapp.js
/* expect N3.js literals with {Literal,Language}StemRange
               *       or non-literals with IriStemRange
               */
expect N3.js literals with {Literal,Language}StemRange
or non-literals with IriStemRange
expect N3 . js literals with { Literal Language } StemRange or non - literals with IriStemRange
function normalizedTest (val, ref, func) {
                if (ShExTerm.isLiteral(val)) {
                  if (["LiteralStem", "LiteralStemRange"].indexOf(valueConstraint.type) !== -1) {
                    return func(ShExTerm.getLiteralValue(val), ref);
                  } else if (["LanguageStem", "LanguageStemRange"].indexOf(valueConstraint.type) !== -1) {
                    return func(ShExTerm.getLiteralLanguage(val) || null, ref);
                  } else {
                    return validationError("literal " + val + " not comparable with non-literal " + ref);
                  }
                } else {
                  if (["IriStem", "IriStemRange"].indexOf(valueConstraint.type) === -1) {
                    return validationError("nonliteral " + val + " not comparable with literal " + JSON.stringify(ref));
                  } else {
                    return func(val, ref);
                  }
                }
              }
function normalizedTest ( val , ref , func ) { if ( ShExTerm . isLiteral ( val ) ) { if ( [ "LiteralStem" , "LiteralStemRange" ] . indexOf ( valueConstraint . type ) !== - 1 ) { return func ( ShExTerm . getLiteralValue ( val ) , ref ) ; } else if ( [ "LanguageStem" , "LanguageStemRange" ] . indexOf ( valueConstraint . type ) !== - 1 ) { return func ( ShExTerm . getLiteralLanguage ( val ) || null , ref ) ; } else { return validationError ( "literal " + val + " not comparable with non-literal " + ref ) ; } } else { if ( [ "IriStem" , "IriStemRange" ] . indexOf ( valueConstraint . type ) === - 1 ) { return validationError ( "nonliteral " + val + " not comparable with literal " + JSON . stringify ( ref ) ) ; } else { return func ( val , ref ) ; } } }
expect N3.js literals with {Literal,Language}StemRange
       or non-literals with IriStemRange
expect N3 . js literals with { Literal Language } StemRange or non - literals with IriStemRange