MCPcopy Index your code
hub / github.com/json-editor/json-editor / setupImask

Method setupImask

src/editors/string.js:262–268  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

260 }
261
262 setupImask (el) {
263 /* Enable imask.js support if library is loaded and config is available */
264 const options = this.expandCallbacks('imask', extend({}, this.defaults.options.imask || {}, this.options.imask || {}))
265 if (typeof options === 'object' && Object.keys(options).length > 0) {
266 this.imask_instance = window.IMask(el, this.ajustIMaskOptions(options))
267 }
268 }
269
270 ajustIMaskOptions (obj) {
271 /* iMask config format is not JSON friendly, so function and regex based mask */

Callers 1

afterInputReadyMethod · 0.95

Calls 3

ajustIMaskOptionsMethod · 0.95
extendFunction · 0.90
expandCallbacksMethod · 0.80

Tested by

no test coverage detected