lorvent's avatar

laravel equivalent helpers for javascript

Hello, for our project...we need similar helpers like str_plural, camel case etc.

i found some worthful links for str_plural like

https://github.com/blakeembrey/pluralize

https://stackoverflow.com/a/27194360/1147114

https://github.com/jeremyruppel/underscore.inflection

and for few other helpers

http://epeli.github.io/underscore.string/

https://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/

but there is no plugin/code having all helpers of laravel.

i thought underscorejs may have all of it but alas! No.

so i wondering if you guys know any js plugin/repo having all helpers of laravel (especially string helper)

thanks.

0 likes
3 replies
Braunson's avatar
Braunson
Best Answer
Level 18

I haven't found any up to date NPM packages or plugins that do this. It would make a great package to build to match all (or most) helpers in Laravel but in JS :)

This library has pretty much all implementations of PHP functions in JS. So if you deconstruct the Laravel helpers and use this library, you can build a pretty closely matching NPM package!

http://locutus.io/php/

Please or to participate in this conversation.