UNPKG

foremark

Version:

A technology for writing semi-plain text documents that extends upon the concept of Markdeep.

20 lines 589 B
"use strict"; // I'm not willing to link immutable.js and add 50KB to the output bundle, so // here it is. Object.defineProperty(exports, "__esModule", { value: true }); /** * Searches and removes a given element from an array, returning the * result as a new array. Returns the original array if the element wasn't * found. */ function arrayRemoveElement(a, x) { var i = a.indexOf(x); if (i < 0) { return a; } else { return a.slice(0, i).concat(a.slice(i + 1)); } } exports.arrayRemoveElement = arrayRemoveElement; //# sourceMappingURL=array.js.map