A simple utility in the form of a VS Code Extension which allows users to get rid of notEmpty in their code which is useful while porting from MarkoV2 to MarkoV3.
Read more about Marko
Converts (notEmpty(data.object))
to (data.object)
- Open
template.marko
file in component directory in VS Code - On a mac open command list by pressing
Cmd+Shift+P
- Type replace-ne
##Installation
- Find and download latest version of distribution in
dist
directory here which is in the.vsix
format - VSCode-->Extensions-->Click on 3 dots in left panel-->Install from VSIX-->Point to downloaded file
Currently marketplace is not featuring the extension hence follow the above steps. Keep checking this section to the extension link on marketplace
VSCode v1.17 and higher
None for now
Good Case : (notEmpty(data.obj))
Result : (data.obj)
Possible Broken Use-Case notEmpty(data.obj)
Result data.obj
Initial release of replace-ne
Enjoy!