JSFiddle - React, Tailwind, and code Playground

by budiadiono

JavaScript

var str = ("export class MigrationApi implements IMigrationApi {"+
  "private _progress: number;"+

  "constructor(){"+
    "this._progress = 0;"+
  "}"+

  "@Route({verb: 'get'})"+
  "*doGet(name: string, age: number): Iterator<string> {"+
  "  console.log('iki', name, this)"+
  "  return 'Oyeah'+ name + '=====' + age"+
  "}"+

  "@Route({verb: 'post', urlParams: 'name'})"+
  "*doPost(name: string, age: number) : Iterator<string> {"+
  "  return 'Weala '+ name + '=====' + age"+
  "}"+
"}")

console.log(str.match(/\*(\w*)(\s*?)\((.*?)\)(\s*?):(\s*?)Iterator<(\w*)>/g))