MCPcopy Index your code
hub / github.com/witheve/Eve / getReplacer

Function getReplacer

src/commonmark.js:2933–2943  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

2931}
2932
2933function getReplacer(map){
2934 return function replace(str){
2935 if(str.charAt(1) === "#"){
2936 if(str.charAt(2) === "X" || str.charAt(2) === "x"){
2937 return decodeCodePoint(parseInt(str.substr(3), 16));
2938 }
2939 return decodeCodePoint(parseInt(str.substr(2), 10));
2940 }
2941 return map[str.slice(1, -1)];
2942 };
2943}
2944
2945module.exports = {
2946 XML: decodeXMLStrict,

Callers 2

getStrictDecoderFunction · 0.85
commonmark.jsFile · 0.85

Calls 1

decodeCodePointFunction · 0.85

Tested by

no test coverage detected