4 ms·
Sed is a command line utility for unixoid shells. It is comparable to awk. I say this because the awk binary is actually an interpreter for the similarly named
by ktpsns 7y ago
Sed is a command line utility for unixoid shells. It is comparable to awk. I say this because the awk binary is actually an interpreter for the similarly named programming language. So awk is in some way similar to the v8 JavaScript interpreter binary.
Using sed from JavaScript is therefore on similar footing then using Python from JavaScript. It results in a heavy process call with challenging passing of information between the caller and the callee. That's the basic difference between a shell script (which relies by definition on the system binaries) and a high level programming language.
I think a fairer question is: why is there not a npm module similarly powerful as sed. I dunno if there is. Maybe it is :)