Closed benomatis closed 7 years ago
$.extend
is used in the docs, but the library itself does not depend on jQuery. The docs also recommend html-escape and _.escape for HTML content.
I agree, a better replacement would be Object.assign
, the vanilla ES6 version of extend. Feel free to change the docs and make a PR if you want to see the change.
I might be missing something, but haven't you mixed up extend
with escape
...?
I'm saying the docs make use of external libraries and try to point out where they do so. jQuery for some utility stuff and other modules for HTML escaping. Vex core does not have any dependencies.
The doc refers to a jQuery plugin function
$.extend
even though it claims to be independent. You may want to "extend" (pun not intended) the script so it uses vanilla js for that.Example:
Source: http://youmightnotneedjquery.com/#extend