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
/** | |
* Title: JavaScript Closure with Properties and Variables. | |
* | |
* Description: In this example you can see that work with closure you can define | |
* properties or variables after use it. | |
* | |
* More Info: https://developer.mozilla.org/es/docs/Web/JavaScript/Closures | |
*/ | |
// Define Anonymous Function for encapsulate from Root Scope. |
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
/** | |
* Title: JavaScript Closures with Function as Parameter. | |
* | |
* Description: In this example you can see that work with closure. You can define | |
* a function and execute when pass the rules of the other function. | |
* In this example you can create a vehicle if the road previously exist. | |
* | |
* More Info: https://developer.mozilla.org/es/docs/Web/JavaScript/Closures | |
*/ |
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
/** | |
* Title: Normalize strings in order to create pretty url. | |
* | |
* Description: If you have to generate beautiful urls from strings | |
* in which certain characters or html elements may exist, this is your tool. | |
*/ | |
const urlNormalize = (str) => { | |
const from = Array.from('ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç'); | |
const to = Array.from('AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuunncc'); |
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
/** | |
* Title: How to create Custom Observable and Operators with RxJS and Node.js. | |
* | |
* Description: With this example I want to show how you can generate custom | |
* Observables and Operators with RxJS and Node.js. | |
*/ | |
import { Observable } from 'rxjs'; | |
import { request } from 'undici'; |