MCPcopy
hub / github.com/BrainJS/brain.js / toFunctionString

Method toFunctionString

src/utilities/data-formatter.js:189–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 }
188
189 toFunctionString() {
190 return `
191var characterTable = ${ JSON.stringify(this.characterTable) };
192var indexTable = ${ JSON.stringify(this.indexTable) };
193var characters = ${ JSON.stringify(this.characters) };
194${ this.toIndexes.toString()
195 .replace(/(let|var) indexTable = this[.]indexTable;\n/, '')
196 .replace(/this[.]/g, '') }
197${ this.toIndexesInputOutput.toString().replace(/this[.]/g, '') }
198${ this.toCharacters.toString()
199 .replace(/(let|var) characterTable = this[.]characterTable;\n/g, '')
200 .replace(/this[.]/, '') }
201`;
202 }
203}

Callers 4

browser.min.jsFile · 0.80
browser.jsFile · 0.80
toFunctionMethod · 0.80
toFunctionMethod · 0.80

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected