This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"versions": { | |
"elm": "0.19.0" | |
}, | |
"types": { | |
"message": "Main.Msg", | |
"aliases": {}, | |
"unions": { | |
"Main.Msg": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$": 0, | |
"a": { | |
"metadata": { | |
"versions": { | |
"elm": "0.19.0" | |
}, | |
"types": { | |
"message": "Main.Msg", | |
"aliases": {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchWords: ["MySecretData", "password"], | |
historySanitizer: function(elmObjectOrRecord) { | |
// in 0.18, replace $ with ctor and a with _0 | |
if (elmObjectOrRecord.$ == "MySecretData") { | |
// replace the access token | |
// make sure to return the updated object! | |
return { …elmObjectOrRecord, a: "[FILTERED]" }; | |
}· | |
else { | |
// we have a record, replace the password field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Any Elm object constructor names or record keys that contain sensitive data. | |
// These will be passed to a sanitizing function you provide. | |
// See the next section for more details. | |
watchWords: termsForSensitiveData, | |
historySanitizer: mySanitizingFunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = MyElmApp.fullscreen() | |
myHistoryRecorder = new ElmRings({ | |
allowDownload: true, | |
trackingFrequency: 60 * 1000, // 60 seconds by default | |
shouldSendHistory: isLoggedIn(), // or whatever's appropriate, defaults to true | |
storeHistory: historyData => { | |
// process, upload, make confetti from your history data | |
} | |
}) | |
myHistoryRecorder.startTracking(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ctor": "::", | |
"_0": { | |
"title": "Too Like the Lightning" | |
}, | |
"_1": { | |
"ctor": "::", | |
"_0": { | |
"title": "The Fear of Barbarians" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"versions": { | |
"elm": "0.18.0" | |
}, | |
"types": { | |
"message": "Main.Msg", | |
"aliases": {}, | |
"unions": { | |
"Main.Msg": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MODEL | |
model = 0 | |
-- UPDATE | |
type Msg | |
= Increment Int | |
| Decrement Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"history": [ | |
{ | |
"ctor": "Decrement", | |
"_0": 1 | |
}, | |
{ | |
"ctor": "Increment", | |
"_0": 2 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"versions": { | |
"elm": "0.18.0" | |
}, | |
"types": { | |
"message": "Main.Msg", | |
"aliases": {}, | |
"unions": { | |
"Main.Msg": { |