Skip to content

Instantly share code, notes, and snippets.

Avatar
💥
shipit

Ioannis Kokkinidis SudoPlz

💥
shipit
View GitHub Profile
@SudoPlz
SudoPlz / file.in
Last active Jun 6, 2017
That js file reads a `file.in` 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.
View file.in
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,
View 0-bridging-react-native-cheatsheet.md
@SudoPlz
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){
//LEXER
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;
}