string-puzzler
implement one method puzzler inside
String.prototype
easier build string elements with auto persist indent
Instalation
npm i string-puzzler --save-dev
yarn add string-puzzler
usage:
; // import method "String.prototype.puzzler" const outline = `constructor( app ) { __BUILD_HERE__}` ; const core = `this.a = 2 ;this.b = 3 ;this.c = 4 ;` ; const marker = '__BUILD_HERE__' ; const build = outline ;
build log:
`constructor( app ) { this.a = 2 ; this.b = 3 ; this.c = 4 ; # eg: new Account( app ) ;}`
with only : outline.replace( marker , core ) ;
build log:
`constructor( app ) { this.a = 2 ;this.b = 3 ;this.c = 4 ; }`