src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js
function stepsMatch(str, lax) {
        var match;

        // First look for any steps().
        match = str.match(STEPS_VALID_REGEX);
        if (match && _validateStepsParams(match)) { // cubic-bezier() with valid params
            return _tagMatch(match, STEP);
        }

        match = str.match(STEPS_GENERAL_REGEX);
        if (match) {
            match = _getValidStepsParams(match);
            if (match && _validateStepsParams(match)) {
                return _tagMatch(match, STEP);
            } else { // this should not happen!
                window.console.log("brackets-steps: TimingFunctionUtils._getValidStepsParams created invalid code");
            }
        }

        // Next look for the step functions (which are special cases of steps())
        if (lax) {
            // For lax parsing, just look for the keywords
            match = str.match(STEP_LAX_REGEX);
            if (match) {
                return _tagMatch(match, STEP);
            }
        } else {
            // For strict parsing, start with a syntax verifying search
            match = str.match(STEP_STRICT_REGEX);
            if (match) {
                // return exact match to keyword that we need for later replacement
                return _tagMatch(str.match(STEP_LAX_REGEX), STEP);
            }
        }

        return null;
    }
function stepsMatch(str, lax) {
        var match;

        // First look for any steps().
        match = str.match(STEPS_VALID_REGEX);
        if (match && _validateStepsParams(match)) { // cubic-bezier() with valid params
            return _tagMatch(match, STEP);
        }

        match = str.match(STEPS_GENERAL_REGEX);
        if (match) {
            match = _getValidStepsParams(match);
            if (match && _validateStepsParams(match)) {
                return _tagMatch(match, STEP);
            } else { // this should not happen!
                window.console.log("brackets-steps: TimingFunctionUtils._getValidStepsParams created invalid code");
            }
        }

        // Next look for the step functions (which are special cases of steps())
        if (lax) {
            // For lax parsing, just look for the keywords
            match = str.match(STEP_LAX_REGEX);
            if (match) {
                return _tagMatch(match, STEP);
            }
        } else {
            // For strict parsing, start with a syntax verifying search
            match = str.match(STEP_STRICT_REGEX);
            if (match) {
                // return exact match to keyword that we need for later replacement
                return _tagMatch(str.match(STEP_LAX_REGEX), STEP);
            }
        }

        return null;
    }
function stepsMatch ( str , lax ) { var match ; // First look for any steps(). match = str . match ( STEPS_VALID_REGEX ) ; if ( match && _validateStepsParams ( match ) ) { // cubic-bezier() with valid params return _tagMatch ( match , STEP ) ; } match = str . match ( STEPS_GENERAL_REGEX ) ; if ( match ) { match = _getValidStepsParams ( match ) ; if ( match && _validateStepsParams ( match ) ) { return _tagMatch ( match , STEP ) ; } else { // this should not happen! window . console . log ( "brackets-steps: TimingFunctionUtils._getValidStepsParams created invalid code" ) ; } } // Next look for the step functions (which are special cases of steps()) if ( lax ) { // For lax parsing, just look for the keywords match = str . match ( STEP_LAX_REGEX ) ; if ( match ) { return _tagMatch ( match , STEP ) ; } } else { // For strict parsing, start with a syntax verifying search match = str . match ( STEP_STRICT_REGEX ) ; if ( match ) { // return exact match to keyword that we need for later replacement return _tagMatch ( str . match ( STEP_LAX_REGEX ) , STEP ) ; } } return null ; }
Match a steps function value from a CSS Declaration or Value.

Matches returned from this function must be handled in
BezierCurveEditor._getCubicBezierCoords().

@param {string} str  Input string.
@param {!boolean} lax  Parsing mode where:
lax=false Input is a Full or partial line containing CSS Declaration.
This is the more strict search used for initial detection.
lax=true  Input is a previously parsed value. This is the less strict search
used to convert previously parsed values to RegExp match format.
@return {!RegExpMatch}
Match a steps function value from a CSS Declaration or Value .