Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions iterator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.cache/
dist/
node_modules/
.idea/
.vscode/
18 changes: 18 additions & 0 deletions iterator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Реализация итератора на TypeScript (Frontend)

**У итератора есть опция пропускать маленькие города**

```javascript
const iteratorWithNoSkip = new CityIterator(citiesList, false);

const iteratorWithSkip = new CityIterator(citiesList, true);
```
### Шаги для инициализации
- Перейти в папку `iterator`
- Установить dev-зависимости `npm install`

### Проверка в браузере
- Выполнить npm start

### Запуск тестов
- Выполнить npm test
11 changes: 11 additions & 0 deletions iterator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>IteratorTest</title>
</head>
<body>
<h3>Please open Dev Console to check how iterator works</h3>
<script src="src/main.ts"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions iterator/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
};
Loading