Run code in particular circumstances
Run code in particular circumstances
Snowflake lets you run a piece of code once, or every so often. It is useful for debugging a function that is run frequently.
<script type="text/javascript" src="snowflake.js"></script><script type="text/javascript"> var var interestingVar = 0; // print out interestingVar once, even though problemFn is run more than once snowflakeonce console.loginterestingVar; ; // print out interestingVar every two seconds snowflakeevery console.loginterestingVar; 2000; interestingVar++; ; whiletrue problemFn; ;</script>
coquette_root/snowflake.js$ npm install snowflake