tiny-mustache icon indicating copy to clipboard operation
tiny-mustache copied to clipboard

property access speed improvement

Open sreekotay opened this issue 5 years ago • 2 comments

  • removed recursion
  • removed array shift
  • addeed property caching

sreekotay avatar Mar 23 '19 15:03 sreekotay

@sreekotay Thank you for the pull request. Even if this speed optimization is perfectly valid I am not going to merge it into the master, as the main goal of the project is to keep the code as small as possible.

aishikaty avatar Oct 03 '19 11:10 aishikaty

I discovered the following bug when testing the code of @sreekotay that does not occur in the original: When empty strings are passed the variables are replaced with null. For example, mustache("Hello {{name}}!", {name: ""}) returns Hello null! instead Hello !.

aaferrari avatar Aug 10 '20 12:08 aaferrari