vue-chunk

1.0.0 • Public • Published

vue-chunk

Split an array into chunks using this custom filter for Vue.js.

Getting Started

With npm

$ npm install vue-chunk --save

Direct include

If you are using Vue globally, just include vue-chunk.js, and it will automatically install the chunk filter.

CommonJS

Vue.use(require('vue-chunk')); // Filter is now available globally

Usage

Meant to be used with v-repeat, this filter splits the array of data into smaller chunks of data. It accepts one argument, which specifies the size of the chunks of data. For example...

<div v-repeat="row: rows | chunk 4">
	<div v-repeat="item: row">
		{{ item }}
	</div>
</div>

Package Sidebar

Install

npm i vue-chunk

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • thomastkim