Given the name of a constant this function will return the constant's associated value
Example 1
Running
1.constant('IMAGINARY_CONSTANT1');
Could return
1.null
function constant(name) {
// Given the name of a constant this function will return the constant's associated value
//
// version: 812.316
// discuss at: http://phpjs.org/functions/constant
// + original by: Paulo Ricardo F. Santos
// * example 1: constant('IMAGINARY_CONSTANT1');
// * returns 1: null
if (window[name] === undefined) {
return null;
}
return window[name];
}