Skip to content

Instantly share code, notes, and snippets.

@gurisko
gurisko / functionName.js
Last active May 11, 2024 05:41
[NodeJS] Get the current function name or any other function while using strict mode
'use strict';
const findFirstOccurrence = (string, searchElements, fromIndex = 0) => {
let min = string.length;
for (let i = 0; i < searchElements.length; i += 1) {
const occ = string.indexOf(searchElements[i], fromIndex);
if (occ !== -1 && occ < min) {
min = occ;
}
}
@Geoff-Ford
Geoff-Ford / master-javascript-interview.md
Last active May 2, 2024 13:13
Eric Elliott's Master the JavaScript Interview Series
@cecilemuller
cecilemuller / launch.json
Last active May 16, 2024 16:38
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],