File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -80,5 +80,5 @@ map codecA = dimap M.toUnfoldable M.fromFoldable <<< array <<< tuple codecA
80
80
-- | A codec for `StrMap` values.
81
81
-- |
82
82
-- | Encodes as an array of two-element key/value arrays in JSON.
83
- strMap ∷ ∀ a . JsonCodec a → JsonCodec (FO.Object a )
84
- strMap = dimap FO .toUnfoldable FO .fromFoldable <<< array <<< tuple string
83
+ foreignObject ∷ ∀ a . JsonCodec a → JsonCodec (FO.Object a )
84
+ foreignObject = dimap FO .toUnfoldable FO .fromFoldable <<< array <<< tuple string
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ maybe codec = basicCodec dec enc
42
42
-- | Encodes as a JSON object with the keys as properties.
43
43
-- |
44
44
-- | ```purescript
45
- -- | encode (strMap int) (Foreign.Object.fromFoldable [Tuple "a" 1, Tuple "b" 2]) == "{ \"a\": 1, \"b\": 2}"
45
+ -- | encode (foreignObject int) (Foreign.Object.fromFoldable [Tuple "a" 1, Tuple "b" 2]) == "{ \"a\": 1, \"b\": 2}"
46
46
-- | ```
47
- strMap ∷ ∀ a . JsonCodec a → JsonCodec (FO.Object a )
48
- strMap codec =
47
+ foreignObject ∷ ∀ a . JsonCodec a → JsonCodec (FO.Object a )
48
+ foreignObject codec =
49
49
mapCodec
50
50
(BF .lmap (Named " StrMap" ) <<< F .map fromArray <<< traverse decodeItem <<< FO .toUnfoldable)
51
51
(F .map (encode codec))
Original file line number Diff line number Diff line change @@ -59,4 +59,4 @@ propStrMapCodec ∷ Gen Result
59
59
propStrMapCodec =
60
60
propCodec
61
61
(genForeignObject genAsciiString genInt)
62
- (JA .strMap JA .int)
62
+ (JA .foreignObject JA .int)
Original file line number Diff line number Diff line change @@ -57,19 +57,19 @@ propStrMapCodec ∷ Gen Result
57
57
propStrMapCodec =
58
58
propCodec
59
59
(genForeignObject genAsciiString genInt)
60
- (JA .strMap JA .int)
60
+ (JA .foreignObject JA .int)
61
61
62
62
propStrMapCodecEncodeCompat ∷ Gen Result
63
63
propStrMapCodecEncodeCompat =
64
64
propCodecEncodeCompat
65
65
(genForeignObject genAsciiString genInt)
66
- (JA .strMap JA .int)
66
+ (JA .foreignObject JA .int)
67
67
68
68
propStrMapCodecDecodeCompat ∷ Gen Result
69
69
propStrMapCodecDecodeCompat =
70
70
propCodecDecodeCompat
71
71
(genForeignObject genAsciiString genInt)
72
- (JA .strMap JA .int)
72
+ (JA .foreignObject JA .int)
73
73
74
74
propCodecEncodeCompat ∷ ∀ a . Eq a ⇒ Show a ⇒ DecodeJson a ⇒ Gen a → JA.JsonCodec a → Gen Result
75
75
propCodecEncodeCompat gen codec = do
You can’t perform that action at this time.
0 commit comments