# collectjs **Repository Path**: mirrors/collectjs ## Basic Information - **Project Name**: collectjs - **Description**: collect.js 是一个方便且无依赖的包装器,用于处理数组和对象。设计灵感来源于 Laravel Collection。 安装 collect.js 是一个标准的 npm package,所以你可以直接通过下面的命令安装: npm install collect.js --save  使用 在 JS 中,有一些比较是和 PHP 比较是不一样的,在默认情况下,JS 会偏向于严格意义的比较,所以有几个方法需要首先认识: Laravel 的 containsStrict() 使用 contains() Laravel 的 toArray() 使用 all() Laravel 的 uniqueStrict() 使用 unique() Laravel 的 whereStrict() 使用 where() Laravel 的 whereInStrict() 使用 whereIn() Laravel 的 whereNotInStrict() 使用 whereNotIn() - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2017-07-04 - **Last Updated**: 2025-09-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # collect.js > Convenient and dependency free wrapper for working with arrays and objects [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fecrmnn%2Fcollect.js%2Fbadge%3Fref%3Dmaster&style=flat-square&label=build)](https://github.com/ecrmnn/collect.js/actions) [![npm version](https://img.shields.io/npm/v/collect.js.svg?style=flat-square)](http://badge.fury.io/js/collect.js) [![npm downloads](https://img.shields.io/npm/dm/collect.js.svg?style=flat-square)](http://badge.fury.io/js/collect.js) [![npm license](https://img.shields.io/npm/l/collect.js.svg?style=flat-square)](http://badge.fury.io/js/collect.js) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![dependencies](https://img.shields.io/badge/dependencies-none-brightgreen.svg?style=flat-square)](https://github.com/ecrmnn/collect.js/blob/master/package.json) [![eslint](https://img.shields.io/badge/code_style-airbnb-blue.svg?style=flat-square)](https://github.com/airbnb/javascript) [![cdnjs version](https://img.shields.io/cdnjs/v/collect.js.svg?style=flat-square)](https://cdnjs.com/libraries/collect.js) ### Installation #### NPM ```bash npm install collect.js --save ``` #### Yarn ```bash yarn add collect.js ``` #### From CDN 1. Visit https://cdnjs.com/libraries/collect.js 2. Add CDN link to your site with `