Skip to content

Instantly share code, notes, and snippets.


Ioannis Kokkinidis SudoPlz

View GitHub Profile
SudoPlz /
Last active Jun 6, 2017
That js file reads a `` input file that contains prop types declarations and outputs an `file.out` file that will act as our shouldComponentUpdate react method. Run it by typing node shouldComponentUpdateCreator.js on your terminal.
screenHasLoaded: React.PropTypes.bool.isRequired,
isPartOfClass: React.PropTypes.bool.isRequired,
appointment: React.PropTypes.instanceOf(Map).isRequired,
// formErrors: React.PropTypes.instanceOf(Map).isRequired,
// timezoneZ: React.PropTypes.string.isRequired,
// isModal: React.PropTypes.bool.isRequired,
isClass: React.PropTypes.bool.isRequired,
classSize: React.PropTypes.number,
h: React.PropTypes.number.isRequired,
SudoPlz / commentRemover.js
Last active May 9, 2021
A messy little js file that removes comments from any string passed into `stripComments(str)` function.
View commentRemover.js
exports.stripComments = function stripComments(toBeStrippedStr){
function Lexer () {
this.setIndex = false;
this.useNew = false;
for (var i = 0; i < arguments.length; ++i) {
var arg = arguments [i];
if (arg === Lexer.USE_NEW) {
this.useNew = true;