MCPcopy Create free account
hub / github.com/SAP/ui5-builder / makeStringLiteral

Function makeStringLiteral

lib/lbt/utils/stringUtils.js:9–13  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

7};
8
9export function makeStringLiteral(str) {
10 return "'" + String(str).replace(/['\r\n\t\\]/g, function(char) {
11 return strReplacements[char];
12 }) + "'";
13}
14
15export function removeHashbang(str) {
16 return str.replace(/^#!(.*)/, "");

Callers 2

runMethod · 0.90
writePreloadModuleMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected