Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Creating epic shit!

Romel Pérez romelperez

:electron:
Creating epic shit!
View GitHub Profile
@romelperez
romelperez / jquery.plugin.js
Last active Nov 22, 2016
A jQuery plugin boilerplate
View jquery.plugin.js
const NAME = 'pluginName';
const methods = {
method1: function () {
const conf = this.data(`${NAME}-config`);
if (!conf) return this;
@romelperez
romelperez / array.methods.js
Created Feb 1, 2015
JavaScript Array Methods
View array.methods.js
// ARRAY METHODS //
// array.concat(item...)
var a = ['a', 'b', 'c'];
var b = ['x', 'y', 'z'];
var c = a.concat(b, true);
// c is ['a', 'b', 'c', 'x', 'y', 'z', true]
// array.join(separator)
var a = ['a', 'b', 'c'];