Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
escapeUnescaped: function(string, charsToEscape = '"') {
let charsRegExp, split;
charsRegExp = RegExp(
`([${Caf.toString(escapeRegExp(charsToEscape))}])`,
"g"
);
split = charsToEscape.match(/\\/)
? [string]
: string.split(/((?:\\.)+)/);
return Caf.array(split, (str, i) =>
Caf.mod(i, 2) === 0 ? str.replace(charsRegExp, "\\$1") : str
).join("");
},
legalUnquotedPropName: (legalUnquotedPropName = /^(0|[1-9][0-9]*|[a-z_][0-9_a-z]*)$/i),
deescapeSpaces: (deescapeSpaces = function(string) {
return Caf.array(string.split(/((?:\\\\)+)/), (str, i) =>
Caf.mod(i, 2) === 0 ? str.replace(/\\[_ ]/g, " ") : str
).join("");
}),
escapeNewLines: function(string) {
this.prototype.getBareInitializers = function() {
let identifiers;
this.bindAllUniqueIdentifiersRequested();
return this._identifiersAssigned &&
(identifiers = this.requiredIdentifierLets).length > 0
? ((identifiers = Caf.array(identifiers, null, identifier =>
identifier.match(/=/)
)),
identifiers.length > 0
? `${Caf.toString(identifiers.join("; "))}`
: undefined)
: undefined;
};
this.prototype.updateScope = function(scope) {
FunctionDefinitionArgStn(
IdentifierStn({ identifier: className })
),
FunctionDefinitionArgStn(
IdentifierStn({
identifier: (classSuperHandle = "classSuper")
})
),
FunctionDefinitionArgStn(
IdentifierStn({
identifier: (instanceSuperHandle = "instanceSuper")
})
)
),
StatementsStn(
(statementsToCount = Caf.array(body.children, stn =>
stn.type === "Object"
? Caf.array(stn.children, objectPropValueStn => {
let propNameStn,
propValueStn,
assignToStn,
propName,
isThisProp;
[
propNameStn,
propValueStn
] = objectPropValueStn.children;
assignToStn = (() => {
switch (propNameStn.type) {
case "ObjectPropName":
({ propName, isThisProp } = propNameStn);
return isThisProp
FunctionDefinitionArgStn(
IdentifierStn({ identifier: className })
),
FunctionDefinitionArgStn(
IdentifierStn({
identifier: (classSuperHandle = "classSuper")
})
),
FunctionDefinitionArgStn(
IdentifierStn({
identifier: (instanceSuperHandle = "instanceSuper")
})
)
),
StatementsStn(
(statementsToCount = Caf.array(
body.children,
stn =>
stn.type === "Object"
? Caf.array(stn.children, objectPropValueStn => {
let propNameStn,
propValueStn,
assignToStn,
propName,
isThisProp;
[
propNameStn,
propValueStn
] = objectPropValueStn.children;
assignToStn = (() => {
switch (propNameStn.type) {
case "ObjectPropName":