mentie 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ env.is_web = () => typeof window !== 'undefined'
21
21
  *
22
22
  * @returns {boolean} True if running in a web browser and the URL includes 'localhost', otherwise false.
23
23
  */
24
- env.is_localhost = () => env.is_web() && `${ location.href }`.includes( 'localhost' )
24
+ env.is_localhost = () => env.is_web() && [ 'localhost', '127.0.0.1', '::1' ].some( host => `${ location.href }`.includes( host ) )
25
25
 
26
26
  /**
27
27
  * Checks if the code is running in the Cypress testing environment within a web browser.
@@ -108,6 +108,12 @@ export const is_node = env.is_node()
108
108
  */
109
109
  export const is_emulator = env.is_emulator()
110
110
 
111
+ /**
112
+ * Checks if the code is running in a development environment.
113
+ * @returns {boolean} Returns true if the code is running in a development environment, otherwise returns false.
114
+ */
115
+ export const is_github_actions = process.env.GITHUB_ACTIONS == true
116
+
111
117
  // ///////////////////////////////
112
118
  // Mode and loglevel detection
113
119
  // ///////////////////////////////
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mentie",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "description": "Mentor's toolbelt",
5
5
  "type": "module",
6
6
  "main": "index.js",