This file contains hidden or 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
| /** | |
| fuentes https://www.youtube.com/watch?v=GhuyqjWPjGk | |
| https://www.youtube.com/watch?v=ppiAvvkvAz0 | |
| https://www.w3.org/TR/websockets/ | |
| */ | |
| //in browser | |
| function wsClient(wsUri){ | |
| wsUri = wsUri || (function IIFFE_getExampleWSURIBasedOnProtocol(){ | |
| var isHttps = location.protocol.slice(-2,-1)==="s"; |
This file contains hidden or 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
| function inherits(target, source) { | |
| for (var k in source.prototype) | |
| target.prototype[k] = source.prototype[k]; | |
| } |
This file contains hidden or 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
| function fuera() { | |
| var str = "las closures son..."; | |
| return function dentro(value) { | |
| if (typeof value !== "undefined") { | |
| str = str + value; | |
| } | |
| return str + ""; | |
| } | |
| } | |
| var dentroDesdeFuera = fuera(); |
This file contains hidden or 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
| function Persona(sexo) { | |
| this.sexo = sexo; | |
| }; | |
| Persona.prototype = { | |
| saluda: function Saludar() { | |
| console.log('hola me llamo ' + this.nombre + ' y soy ' + this.sexo); | |
| } | |
| }; |
This file contains hidden or 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
| "scripts": { | |
| "test": "jest -o --watch" | |
| }, | |
| "jest": { | |
| "collectCoverage": true, | |
| "verbose": true | |
| }, | |
| "devDependencies": { | |
| "jest": "^22.4.3", | |
| "fsevents": "^1.2.0" |
This file contains hidden or 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
| const Gulp = require('gulp'); | |
| const genericPlugin = concatena = minifica = ofusca = () => null; | |
| Gulp.task('default', () => { | |
| console.log('haciendo cosicas'); | |
| return Gulp.src('./inputDir') | |
| .pipe(genericPlugin) | |
| .pipe(concatena) | |
| .pipe(minifica) |
This file contains hidden or 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
| import React from 'react'; | |
| export default function FunctionalTank(props) { | |
| console.log('Con una función cualquiera te haces un componente',props );//TODO: borrame. | |
| const info = | |
| <div className="tankInfo"> | |
| El tanke tiene:{props.material} | |
| le cogen : {props.maxCapacity} | |
| Contenido actual: {props.actualQuantity} | |
| Está ahora mismo al : {(props.actualQuantity / props.maxCapacity) * 100} % | |
| </div>; |
This file contains hidden or 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
| /** | |
| * Clase para probar el "fetch" , by PasSh. | |
| */ | |
| "use strict" | |
| var fetch = require('node-fetch'); | |
| class ApiClient { | |
| constructor(url, token) { | |
| this.url = url; | |
| this.token = token; | |
| } |
NewerOlder