MCPcopy
hub / github.com/enquirer/enquirer / format

Method format

lib/types/string.js:174–180  ·  view source on GitHub ↗
(input = this.value)

Source from the content-addressed store, hash-verified

172 }
173
174 async format(input = this.value) {
175 let initial = await this.resolve(this.initial, this.state);
176 if (!this.state.submitted) {
177 return placeholder(this, { input, initial, pos: this.cursor });
178 }
179 return this.styles.submitted(input || initial);
180 }
181
182 async render() {
183 let size = this.state.size;

Callers 1

renderMethod · 0.95

Calls 2

placeholderFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected