UNPKG

substance

Version:

Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing system. It is developed to power our online editing platform [Substance](http://substance.io).

10 lines (9 loc) 198 B
export default function deleteFromArray (array, value) { if (!array) return for (var i = 0; i < array.length; i++) { if (array[i] === value) { array.splice(i, 1) i-- } } }