Skip to content

vue-qs v0.1.18


vue-qs / createRuntimeEnvironment

Function: createRuntimeEnvironment()

createRuntimeEnvironment(): RuntimeEnvironment

Defined in: utils/core-helpers.ts:34

Creates a runtime environment object with safe property access

Returns

RuntimeEnvironment

Runtime environment information

Example

ts
const env = createRuntimeEnvironment();
if (env.isBrowser && env.windowObject) {
  // Safe to use window
  console.log(env.windowObject.location.href);
}

Released under the MIT License.