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
// we concatenate projects thanks to the spread operator of ES6 | |
const allProjects = [ | |
...projectsB, | |
...projectsA | |
]; | |
// we use the new Set object | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set |
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
// if / else if style (not very readable) | |
if (filter.status === 'closed') { | |
return _.isDate(topic.archived); | |
} else if (filter.status === 'opened') { | |
return !_.isDate(topic.archived); | |
} else { | |
return true; | |
} | |
// switch style more space the case are more identified |
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
// V is a type that can be passed as a parameter in the interface | |
// so in this case the V can be passed to customize the interface | |
interface EntityState<V> { | |
ids: string[] | number[]; | |
entities: { [id: string | id: number]: V }; | |
} |
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
// https://platform.ultimateangular.com/courses/ngrx-store-effects/lectures/3788533 | |
const character = { name: "Han Solo"}; | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign | |
// Do not work for deep clone | |
const characterUpdated = Object.assign({}, character, { function: "captain"}); | |
const characterUpdatedAlt = { | |
...character, | |
function: "captain" |
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
// Angular Ngrx lesson where I saw this code | |
// https://platform.ultimateangular.com/courses/ngrx-store-effects/lectures/3919399 | |
// Documentation of Object keys function | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys | |
const pizzas = { 1: {id: 1, name: 'marguerita'}, 2: { id: 2, name: 'valentina'}}; | |
// parseInt is necessary because, Object.keys return the property as a string | |
// and our object porperties are in our example number |
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
// Angular Ngrx lesson where I saw this code | |
// https://platform.ultimateangular.com/courses/ngrx-store-effects/lectures/3919399 | |
// Documentation of array reduce function | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | |
interface Pizza { | |
id: number; | |
name: string; |
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
{ | |
"editor.formatOnSave": false, | |
"beautify.tabSize": 2, | |
"sasslint.enable": true, | |
"editor.minimap.enabled": false, | |
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe" | |
} |
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
[vc_row] | |
[vc_column] | |
[qodef_call_to_action full_width="no" content_in_grid="yes" grid_size="75" type="normal" show_button="yes" button_link="https://bricks.typeform.com/to/Zx8q2D" button_type="solid" button_hover_animation="hover-animation" button_icon_pack="" color="#ffffff" background_color="#b2dd4c" button_text="Join Bricks Beta" border_color="#b2dd4c" hover_background_color="#282828"hover_border_color="#282828"] | |
<h4 style="color: #777777;">Want to try agile method with one of your architecture projects?</h4> | |
[/qodef_call_to_action] | |
[/vc_column] | |
[/vc_row] |
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
describe("The suit", function() { | |
var parameterized; | |
beforeEach(function() { | |
return console.log('non-parameterized#beforeEach'); | |
}); | |
afterEach(function() { | |
return console.log('non-parameterized#afterEach'); | |
}); | |
it("should execute specs in the non-parameterized part", function() { | |
console.log('spec in non-parameterized'); |
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
{ | |
"rulesDirectory": [ | |
"node_modules/codelyzer" | |
], | |
"rules": { | |
"callable-types": true, | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" |