lua.js icon indicating copy to clipboard operation
lua.js copied to clipboard

string.format() and sprintf.js

Open florentpoujol opened this issue 11 years ago • 0 comments

Hello there !

I am currently adding the missing string functions and I use a fork of sprintf.js to power string.format().

My question is where put the code of sprintf in lualib.js or anywhere in the repo ? Adding a minified version directly in lualib.js works well but I am not sure it's the best way to handle this ? Adding a separate file in src/ and using require() in lualib should works too but I don't have a node.js environment to test this. Or maybe include sprintf's code during the build of lua_paser ?

Also, the oiginal sprintf.js is under the 3 clauses BSD licence, I don't know how it could go along lua.js's licence ?

Thanks for your insights.

florentpoujol avatar Oct 27 '13 10:10 florentpoujol