Skip to content

Commit 9c5a840

Browse files
authoredAug 1, 2023
Rename uneffectfulHref to hrefPure (#21)
* Rename to hrefPure * Add changelog entry
1 parent 3d1f35a commit 9c5a840

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ New features:
1111
Bugfixes:
1212

1313
Other improvements:
14+
- Rename `uneffectfulHref` to `hrefPure` (used in `Show` instance) (#21 by @JordanMartinez)
1415

1516
## [v7.0.0](https://github.com/purescript-node/purescript-node-url/releases/tag/v7.0.0) - 2023-07-31
1617

‎src/Node/URL.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const hostnameImpl = (u) => u.hostname;
1515
export const setHostnameImpl = (val, u) => {
1616
u.hostname = val;
1717
};
18-
export const uneffectfulHref = (u) => u.href;
18+
export const hrefPure = (u) => u.href;
1919
export const hrefImpl = (u) => u.href;
2020
export const setHrefImpl = (val, u) => {
2121
u.href = val;

‎src/Node/URL.purs

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Prim.Row as Row
4949
foreign import data URL :: Type
5050

5151
instance Show URL where
52-
show x = "URL(" <> uneffectfulHref x <> ")"
52+
show x = "URL(" <> hrefPure x <> ")"
5353

5454
new :: String -> Effect URL
5555
new input = runEffectFn1 newImpl input
@@ -96,7 +96,8 @@ setHostname val url = runEffectFn2 setHostnameImpl val url
9696

9797
foreign import setHostnameImpl :: EffectFn2 String URL Unit
9898

99-
foreign import uneffectfulHref :: URL -> String
99+
-- do not export
100+
foreign import hrefPure :: URL -> String
100101

101102
href :: URL -> Effect String
102103
href url = runEffectFn1 hrefImpl url

0 commit comments

Comments
 (0)
Please sign in to comment.