Skip to content

Instantly share code, notes, and snippets.

Joppe Koers SirMorfield

Block or report user

Report or block SirMorfield

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View usefulFunctions.js
(new Date()).toLocaleDateString('en-GB').replace(/\//g, '-')
function randomStr({ length = 32, numbers = true, capitalLetters = true, lowerCaseLetters = true }) {
let text = '';
let possible = '';
if (numbers) possible += '1234567890';
if (capitalLetters) possible += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
if (lowerCaseLetters) possible += 'abcdefghijklmnopqrstuvwxyz';
View snippets.json
"constructor": {
"prefix": "con",
"body": "constructor(${1:params}) {\n\t${0}\n}",
"description": "Add default constructor in a class in ES6 syntax"
"forEach": {
"prefix": "fore",
"body": "${1:array}.forEach(${2:currentItem} => {\n\t${0}\n});",
"description": "Creates a forEach statement in ES6 syntax"
View .gitignore
You can’t perform that action at this time.