![]() When it comes to the write method that is what can be used to mutate a buffer in place, much like that of the Array splice method. When looking at the nodejs docs it would seem that there is no such method in the Buffer class, however there is the Buffer write method. ![]() There is however the array splice method that will mutate the array in place, so then the question might arise as to how to go about doing that with a buffer in nodejs. The slice method is often what I would use when it comes to creating a sub array from an array because of the nature of not mutating the array in place. When it comes to working with buffers in nodejs there is the nodejs buffer slice method that works more or less just like the Array slice method that will create a new array from an array without mutating the source array.
0 Comments
Leave a Reply. |