Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Bring Laravel Collections to JavaScript with Collect.js
Jun 19, 2017 @ 14:31:22

The Laravel News site has a quick post sharing an interesting Javascript library that brings the functionality of Laravel's collections over from PHP to the world of Javascript.

Collect.js is a port of Laravel Collections to JavaScript. It’s dependency free and makes working with arrays and objects easy. [...] It’s almost a one to one map with the Laravel version and it even includes the fairly new Collection Tap method.

There are some differences, however, including the requirement that all comparisons use strict equality versus the looser version PHP allows. The post includes the npm install command to get the library installed, gives a simple example of it in use and links to both the GutHub repo and the NPM page for more details.

tagged: laravel news collection collectjs functionality port library npm

Link: https://laravel-news.com/javascript-collections


Trending Topics: