Skip to content

Instantly share code, notes, and snippets.

View popigg's full-sized avatar
🏠
Working from home

Pablo Gomez Guerrero popigg

🏠
Working from home
View GitHub Profile
@robbestad
robbestad / limitFromTo.js
Last active December 27, 2015 07:29
Limit From-To filter for AngularJS
/**
* @name limitFromTo
* @by Sven Anders Robbestad, 2013
* @license CC0 1.0 Universal (CC0 1.0)
* @description
* Limit From-To filter for AngularJS.
* Creates a new array or string containing only a specified number of elements with an extra
* parameter specifying the starting point..
* The elements are taken from either the beginning or the end of the source array or string, as
* specified by the value and sign (positive or negative) of `limit`.