JSFiddle

  • VueJS Map - Filter

    Programación funcional para la asociación de arrays de objetos.

    const ratings = [
    	{movieId: 1, value: 4},
    	{movieId: 2, value: 1},
    	{movieId: 3, value: 2},
    	{movieId: 4, value: 5},
    	{movieId: 5 ...
  • VueJS LUIS

    Pruebas básicas de LUIS

    'use strict';
    
    // https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/5f06a582-19f2-4938-934d-6e3c1b7d21d7?subscription-key=d03c13861a9d43adaf88f79c824973a3&verbose=true&timezoneOffset=60&q=
    
    Vue.$http = axios;
    
    const vm = new Vue({
    		el ...
  • Vue JS - Workshop

    No-Library (pure JS), HTML, CSS, JavaScript

    /*
    * @Author: internoma
    * @Date:   2017-05-27 01:24:01
    * @Last Modified by:   internoma
    * @Last Modified time: 2017-05-30 23:22:40
    */
    
    'use strict ...
  • Vue JS - Active List Mixin

    Item active from list - getActive - setActive with localStorage persistence

    'use strict';
    
    const activeList = {
      data: {
        activeList: {
          storageKey: 'activeList',
          itemActive: 1
        }
      },
      methods: {
        getActive: function(item) {
          return (item === this.activeList.itemActive) ? 1 ...
  • Javascript Extend

    No-Library (pure JS), HTML, CSS, JavaScript

    /*
     * El método Extend
     */
    Object.prototype.extend = Object.prototype.extend || function (destination, source) {
      for (var property in source) { destination[property] = source ...
  • Vue localStore

    Vue localStore

    const vstore = {
      localStoreSupport: function() {
        try {
          return "localStorage" in window && window["localStorage"] !== null;
        } catch (e) {
          return false;
        }
      },
      setObj: function(key, obj, days) {
        var expires ...
  • ES6 Promises

    No-Library (pure JS), HTML, CSS, JavaScript

    'use strict';
    
    //Here we create the promise
    function httpGET(url) {
    	return new Promise(function (resolve, reject) {
    		//create request object
    		var ...
  • VueJS integration MomentJS #1 is the latest revision

    Vue (edge), HTML, CSS, JavaScript

    var vm = new Vue({
    	el: 'main',
    	data: {
    		prueba: 'este es el <b>contenido</b> de la variable prueba',
    		fecha: 'Oct 20, 2016 ...
  • Javascript Merge & Extend

    vanilla javascript

    'use strict';
    
    function mergeObject(trg, src) {
      Object.keys(src).forEach(function (key) {
        return trg[key] = src[key];
      });
    }
    
    function extendObject(trg ...
  • Normalizar tildes en string

    No-Library (pure JS), HTML, CSS, JavaScript

    var normalize = (function() {
      var from = "ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç", 
          to   = "AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuunncc",
          mapping = {};
     
      for(var i = 0, j = from.length; i < j; i++ )
          mapping ...