Skip to content

Commit 9b48f83

Browse files
iarthstargaryb
authored andcommitted
Add : console.clear (#23)
1 parent 8224f6e commit 9b48f83

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/Effect/Class/Console.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ timeLog = liftEffect <<< EffConsole.timeLog
3838

3939
timeEnd :: forall m. MonadEffect m => String -> m Unit
4040
timeEnd = liftEffect <<< EffConsole.timeEnd
41+
42+
clear :: forall m. MonadEffect m => m Unit
43+
clear = liftEffect EffConsole.clear

src/Effect/Console.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ exports.timeEnd = function (s) {
4848
return {};
4949
};
5050
};
51+
52+
exports.clear = function () {
53+
console.clear();
54+
return {};
55+
};

src/Effect/Console.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ foreign import timeLog :: String -> Effect Unit
5353

5454
-- | Stop a named timer and print time since it started in milliseconds.
5555
foreign import timeEnd :: String -> Effect Unit
56+
57+
-- | Clears the console
58+
foreign import clear :: Effect Unit

0 commit comments

Comments
 (0)