-
- /**
- * Checks whether the value matches the requirements for this constraint.
- *
- * @memberof Drupal.states.Dependent#
- *
- * @param {string|Array|object} value
- * Either the value of a state or an array/object of constraints. In the
- * latter case, resolving the constraint continues.
- * @param {string} [selector]
- * The selector for this constraint. If undefined, there isn't yet a
- * selector that this constraint applies to. In that case, the state key
- * is propagates to a selector and resolving continues.
- * @param {Drupal.states.State} [state]
- * The state to check for this constraint. If undefined, resolving
- * continues. If both selector and state aren't undefined and valid
- * non-numeric strings, a lookup for the actual value of that selector's
- * state is performed. This parameter is not a State object but a pristine
- * state string.
- *
- * @return {bool}
- * true or false, depending on whether this constraint is satisfied.
- */
- checkConstraints: function (value, selector, state) {
- // Normalize the last parameter. If it's non-numeric, we treat it either
- // as a selector (in case there isn't one yet) or as a trigger/state.
- if (typeof state !== 'string' || (/[0-9]/).test(state[0])) {