Skip to content

Instantly share code, notes, and snippets.

View jrcarl624's full-sized avatar
♠️
Spadix

Joshua Carlson jrcarl624

♠️
Spadix
View GitHub Profile
// regex to fine stuff in between html tags that are in a string and return the text in the html tag and place comma after each
// regex to find the text in between html tags and return the text in the html tag and place comma after each
var str = "<h1>Hello</h1><p>This is a paragraph</p>";
function findTextInBetweenTags(string) {
var regex = /<[^>]*>/g,
result = string.split(regex),
text = "",
array = [];
@jrcarl624
jrcarl624 / stuff.md
Last active November 25, 2021 04:59
stuff
        Object.values(Commandstrut).forEach((element: (Command?: any, eventData?: any) => {
            name: string,
            description?: string,
            aliases?: Array<string>,
            usage?: string,
            example?: string,
            cancelMessage?: string,
        }) => {
            if (element().aliases.includes(Command[0]) || element().name == Command[0]) {

if (Commandstrut[Command[0]](Command, eventData).cancelMessage == true) {

‎‎​
import {
Entity,
EntityAddRiderComponent,
EntityAgeableComponent,
EntityBreathableComponent,
EntityCanClimbComponent,
EntityCanFlyComponent,
EntityCanPowerJumpComponent,
EntityColorComponent,
EntityFireImmuneComponent,
const listFiles = (
dir: fs.PathLike,
files?: path.ParsedPath[] | undefined
): path.ParsedPath[] => {
files = files || [];
var funcList = fs.readdirSync(dir);
for (var i in funcList) {
var name = dir + "/" + funcList[i];
if (fs.statSync(name).isDirectory()) {
listFiles(name, files);