How to use the caffeine-script-runtime.array function in caffeine-script-runtime

To help you get started, we’ve selected a few caffeine-script-runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github caffeine-suite / caffeine-script / source / CaffeineScript / Lib.js View on Github external
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),
github caffeine-suite / caffeine-script / source / CaffeineScript / Lib.js View on Github external
deescapeSpaces: (deescapeSpaces = function(string) {
          return Caf.array(string.split(/((?:\\\\)+)/), (str, i) =>
            Caf.mod(i, 2) === 0 ? str.replace(/\\[_ ]/g, " ") : str
          ).join("");
        }),
        escapeNewLines: function(string) {
github caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / ScopeStnMixin.js View on Github external
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) {
github caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / StnsGeneratingJs / ClassStn.js View on Github external
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
github caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / JustToJsWithTransforms / ClassStn.js View on Github external
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":

caffeine-script-runtime

Runtime library for CaffeineScript

ISC
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages