| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
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
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
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
| SET NAMES utf8; | |
| DROP TABLE IF EXISTS `cc_bins`; | |
| CREATE TABLE `cc_bins` ( | |
| `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
| `bank_code` int(11) NOT NULL, | |
| `bank_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
| `bin_number` int(11) NOT NULL, | |
| `card_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, |
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
| // Let's reduce the array of arrays into a single one | |
| const songNames = allSongs.reduce((acc, currValue) => { | |
| return acc.concat(currValue); | |
| }, []) | |
| // Let's map it out with the seconds turned into minutes | |
| .map(song => { | |
| return { ...song, duration: Math.floor(song.duration / 60) }; | |
| }) | |
| // Let's filter the ones under 3 minutes | |
| .filter(song => { |


