Skip to content
Ken Hiatt edited this page Aug 27, 2017 · 2 revisions

Welcome to the Figlet.psm1 wiki!

Porting notes

Started thinking more about the array.slice() calls I was encountering and didn't feel good about my quick and dirty solution. If the start and end values were positive and such that start <= end then my q-n-d would probably have worked, but the more I thought about it the more I figured I needed to implement something closer to what the JavaScript array.slice() did. A bit of experimenting use node showed that slice just works differently than what I am used to. A bit of searching got me the ECMAscript spec and I think I got the logic to what was needed for the module. PS does not have an undefined like JS does and the objects inside the slice (I think) are refs not copies (my slice replacement makes copies). We'll see when I start testing if I need to drill in and use refs.

Speaking of refs, there is at least one function, padLines that I already need to redo. I sort of figured that when I did the quick translation, even had a comment to that effect. I did a little reading on JS byref/byval and I'm currently hoping that doesn't become a stumbling block in this port. UPDATE : Fixing this didn't require refs, was overthinking things and ignoring that the array going into the function was already byref.

Clone this wiki locally