To work out which environment the site is on (dev/staging/live)
Methods
(inner) extractDevUrlPrefix() → {string}
Get the prefix of the url identifying the development/staging server.
Returns:
eg: d51alfie.comcar.co.uk --> d51alfie, d5117.comcar.co.uk --> d5117, comcar.co.uk --> [empty string]
- Type
- string
(inner) isDev() → {boolean}
Returns true if the code is being executed on a local development server; false otherwise
Returns:
- Type
- boolean
(inner) isLive() → {boolean}
Returns true if the code is being executed on a live server; false if it's on a local dev or staging server
Returns:
- Type
- boolean
(inner) isStaging() → {boolean}
Returns true if the code is being executed on a staging server; false otherwise
Returns:
- Type
- boolean