This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
gulp.task('browserify', function() { | |
return browserify({ debug: true }) | |
.transform(babelify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Exemplo: | |
* var users = [ | |
* {name: 'Victor Queiroz'}, | |
* {name: 'João Bosco'}, | |
* {name: 'Ruan Jordão'} | |
* ]; | |
* | |
* Aplicando o filtro: | |
* {{ users | pluck:'name' | join:', ' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Esta função retira apenas as chaves de nome igual a @index de | |
* todos os objetos dentro de um array, coloca apenas os valores | |
* das respectivas chaves nas respectivas ordens, dentro de um | |
* array e logo depois faz um join(), retornando apenas | |
* uma string, separada por @token. | |
* Exemplo: | |
* var users = [ | |
* {name: 'Victor Queiroz'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"node" : true, | |
"browser" : true, | |
"es5" : true, | |
"esnext" : true, | |
"bitwise" : true, | |
"camelcase": true, | |
"curly" : true, | |
"eqeqeq" : true, | |
"immed" : true, |