String-Compiler v0.0.3 beta
This script compiles javascript code from a string and using a pattern string
Install:
$ npm install string-compiler
Import packages:
const StringParser = StringParserrules/* text */ /* data */
Testing commands:
$ npm test
Testing: ./test/test.*.js
JSON parse and use string-compiler
const fs = const StringParser = let message = JSON // Template strings are changed to transmitted dataconsole// Output: "Testing lib: Hello World" // Or if there is no template line in the text and transfer data, then this data will be ignoredconsole// Output: "Testing lib!" // Plain text outputconsole// Output: "Testing lib!" // -- use more keys console// Output: "Hello JavaScript"console// Output: "Hello!"console// Output: "Hello!"
Use string and use string-compiler
const StringParser = // Template strings are changed to transmitted dataconsole// Output: "New message to the world: Hello World!" // Or if there is no template line in the text and transfer data, then this data will be ignoredconsole// Output: "I am a programmer and I am writing?" // Plain text outputconsole// Output: "It turns out that { I } write hello world? $"