Skip to content

Commit ab2016d

Browse files
authored
Merge pull request #11 from charleso/topic/stringify
Rename and export stringify
2 parents f70e919 + abe87a3 commit ab2016d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Data/Argonaut/Core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports.fromObject = id;
1717

1818
exports.jsonNull = null;
1919

20-
exports._stringify = function(j) {
20+
exports.stringify = function(j) {
2121
return JSON.stringify(j);
2222
};
2323

src/Data/Argonaut/Core.purs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module Data.Argonaut.Core
4343
, jsonSingletonArray
4444
, jsonEmptyObject
4545
, jsonSingletonObject
46+
, stringify
4647
) where
4748

4849
import Prelude
@@ -228,11 +229,11 @@ instance ordJson :: Ord Json where
228229
compare a b = runFn5 _compare EQ GT LT a b
229230

230231
instance showJson :: Show Json where
231-
show = _stringify
232+
show = stringify
232233

233234
-- Foreigns
234235

235-
foreign import _stringify :: Json -> String
236+
foreign import stringify :: Json -> String
236237
foreign import _foldJson :: forall z. Fn7 (JNull -> z) (JBoolean -> z)
237238
(JNumber -> z) (JString -> z) (JArray -> z)
238239
(JObject -> z) Json z

0 commit comments

Comments
 (0)