@frehner/apphistory
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@frehner/apphistory", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A polyfill for the appHistory proposal. Not ready for production", | ||
@@ -5,0 +5,0 @@ "main": "build/esm/appHistory.min.js", |
@@ -16,3 +16,3 @@ # appHistory polyfill | ||
```js | ||
import { useBrowerPolyfill } from "TODO"; | ||
import { useBrowerPolyfill } from "@frehner/apphistory"; | ||
userBrowserPolyfill(); | ||
@@ -27,3 +27,3 @@ | ||
```js | ||
import { AppHistory } from "TODO"; | ||
import { AppHistory } from "@frehner/apphistory"; | ||
const appHistory = new AppHistory(); | ||
@@ -30,0 +30,0 @@ |
@@ -55,2 +55,6 @@ import { useBrowserPolyfill } from "./polyfill"; | ||
}); | ||
it("should not error out if no param passed", () => { | ||
useBrowserPolyfill(); | ||
}); | ||
}); |
@@ -6,5 +6,3 @@ import { AppHistory } from "./appHistory"; | ||
}; | ||
export function useBrowserPolyfill({ | ||
configurable = false, | ||
}: UseBrowserPolyfillOptions) { | ||
export function useBrowserPolyfill(options?: UseBrowserPolyfillOptions) { | ||
if ("appHistory" in window) { | ||
@@ -17,3 +15,3 @@ return; | ||
enumerable: true, | ||
configurable, | ||
configurable: options?.configurable ?? false, | ||
}); | ||
@@ -20,0 +18,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155103
2225