==
and !=
JS-005089 ssl: (process.env.SSL || 'off') == 'on',
90 ssl_cert_path: process.env.SSL_CERT_PATH || 'tests/ssl/mock-cert.pem',
91 ssl_key_path: process.env.SSL_KEY_PATH || 'tests/ssl/mock-key.pem',
92 socket: (process.env.SOCKET || 'off') == 'on',93 socket_url: process.env.SOCKET_URL || 'http://localhost:6000',
94 socket_token: process.env.SOCKET_TOKEN || 'test-subscription-api',
95 }
86 waf_header_exclude_rules:
87 process.env.WAF_HEADER_EXCLUDE_RULES || '14,33,80,96,100',
88 waf_body_exclude_rules: process.env.WAF_BODY_EXCLUDE_RULES || '',
89 ssl: (process.env.SSL || 'off') == 'on',90 ssl_cert_path: process.env.SSL_CERT_PATH || 'tests/ssl/mock-cert.pem',
91 ssl_key_path: process.env.SSL_KEY_PATH || 'tests/ssl/mock-key.pem',
92 socket: (process.env.SOCKET || 'off') == 'on',
81 rate_limit_ban_minutes: parseInt(
82 process.env.RATE_LIMIT_BAN_MINUTES || '15'
83 ),
84 waf: (process.env.WAF || 'on') == 'on',85 waf_url_exclude_rules: process.env.WAF_URL_EXCLUDE_RULES || '',
86 waf_header_exclude_rules:
87 process.env.WAF_HEADER_EXCLUDE_RULES || '14,33,80,96,100',
74 rate_limit_session_threshold: parseInt(
75 process.env.RATE_LIMIT_SESSION_THRESHOLD || '100'
76 ),
77 rate_limit_ban_ip: (process.env.RATE_LIMIT_BAN_IP || 'on') == 'on',78 rate_limit_ip_threshold: parseInt(
79 process.env.RATE_LIMIT_IP_THRESHOLD || '500'
80 ),
67 ? parseInt(process.env.DATABASE_PORT)
68 : 6379,
69 database_password: process.env.DATABASE_PASSWORD || '',
70 rate_limit: (process.env.RATE_LIMIT || 'on') == 'on',71 rate_limit_sample_minutes: parseInt(
72 process.env.RATE_LIMIT_SAMPLE_MINUTES || '60'
73 ),
It is considered good practice to use the type-safe equality operators ===
and !==
instead of their regular counterparts ==
and !=
.
The strict equality operators (===
and !==
) use the strict equality comparison algorithm to compare two operands.
false
.true
only if they refer to the same object.null
or both operands are undefined
, return true
.NaN
, return false
.+0
and -0
are considered to be the same value.true
or both false
.The most notable difference between this operator and the equality (==
) operator is that if the operands are of different types, the ==
operator attempts to convert them to the same type before comparing.
a == b
foo == true
bananas != 1
value == undefined
typeof foo == 'undefined'
'hello' != 'world'
0 == 0
true == true
foo == null
a === b
foo === true
bananas !== 1
value === undefined
typeof foo === 'undefined'
'hello' !== 'world'
0 === 0
true === true
foo === null