]> git.proxmox.com Git - extjs.git/blame - extjs/packages/core/src/util/Operators.js
bump version to 7.0.0-4
[extjs.git] / extjs / packages / core / src / util / Operators.js
CommitLineData
947f0963
TL
1/**
2 * This class defines the operators that are shared by DomQuery and ComponentQuery
3 * @class Ext.util.Operators
4 * @private
5 */
6/* eslint-disable eqeqeq */
7Ext.ns('Ext.util').Operators = {
8// @define Ext.util.Operators
9 "=": function(a, v) {
10 return a == v;
11 },
12 "!=": function(a, v) {
13 return a != v;
14 },
15 "^=": function(a, v) {
16 return a && a.substr(0, v.length) == v;
17 },
18 "$=": function(a, v) {
19 return a && a.substr(a.length - v.length) == v;
20 },
21 "*=": function(a, v) {
22 return a && a.indexOf(v) !== -1;
23 },
24 "%=": function(a, v) {
25 return (a % v) === 0;
26 },
27 "|=": function(a, v) {
28 return a && (a == v || a.substr(0, v.length + 1) == v + '-');
29 },
30 "~=": function(a, v) {
31 return a && (' ' + a + ' ').indexOf(' ' + v + ' ') != -1;
32 }
33};