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
| cp app/configs/default.template.php app/configs/default.php |
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
| composer install |
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
| cd my-project |
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
| git clone https://github.com/redound/phalcon-rest-boilerplate my-project |
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
| var collection = new TSCore.Data.Collection<number>([1, 2, 3, 4]); | |
| var copy = collection.clone(); | |
| collection.remove(2); | |
| copy.toArray(); | |
| // [1, 2, 3, 4] |
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
| var item = new Item("Couch"); | |
| var collection = new TSCore.Data.Collection([item]); | |
| collection.contains(item); | |
| // true |
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
| var collection = new TSCore.Data.Collection([]); | |
| collection.isEmpty(); | |
| // true |
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
| var collection = new TSCore.Data.Collection<number>([1, 2, 3, 4]).find(value => { | |
| return value > 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
| var collection = new TSCore.Data.Collection<number>([1, 2, 3, 4]); | |
| var filtered = collection.filter(value => { | |
| return value > 2; | |
| }); | |
| filtered.toArray(); | |
| // [3, 4] |
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
| var collection = new TSCore.Data.Collection<number>([1, 2, 3, 4]); | |
| var filtered = collection.reject(value => { | |
| return value > 2; | |
| }); | |
| filtered.toArray(); | |
| // [1, 2] |