This is a javascript function that matches quotes while disregarding all escaped quotes.
outputArray = matchQuotes(
inputString,
chars,
lengths,
"use strict"; | |
var Shape = function (el, colour) { | |
var color, shape, | |
that = this; | |
shape = el.getAttribute("shape-type") || "square"; | |
change(); | |
this.newColor = function (color) { | |
el.setAttribute("shape-color", color); | |
change(); |
This will download and symlink to a specified nodejs version.
The batch file is dependent on both 7zip and curl, these are automatically downloaded (regardless of if they're already installed).
To install simply download the batch file, and add the NodeJS and nvm 'directories' to the %path% enviromnment variable.
In my case my path became: %path%;%appdata%\nodejs;%appdata%\nvm
const cssPath = (function () { | |
function tagUnique(l) { | |
const es = [].filter.call( | |
l.parentElement.children, | |
e => e !== l | |
); | |
return -1 === [] | |
.map.call(es, e => e.tagName) | |
.indexOf(l.tagName); | |
} |
function getArgs(func) { | |
/** | |
* Basic function regex | |
* - /^function\s*\w*\(([\w\W]*?)\)\s*{/ | |
* | |
* Arrow function regex | |
* - /^([^()]*)\s*=>/ | |
* - /^\(([\w\W]*?)\)\s*=>/ | |
* */ | |
const domMonitor = function (tagname, eventname, options) { | |
tagname = tagname.trim().toLowerCase(); | |
eventname = eventname.trim(); | |
options = options || {}; | |
const property = options.property || 'outline-color'; | |
const propertyFrom = options.property || '#fff'; | |
const propertyTo = options.property || '#000'; | |
const evn = new Event(eventname, { |
Simply include:
const { normalize, join } = require('node:path'); | |
/** | |
* @returns {string} | |
*/ | |
function findExecutingFile() { | |
// This is covered in the 'package-eval' tests. Jest just does not know that... | |
/* istanbul ignore next */ | |
return normalize( | |
// This is present for `type: commonjs` after startup |