Giter Club home page Giter Club logo

posixuserjs's Introduction

posixuserjs

posixuserjs's People

Contributors

dmitryi698 avatar maximumquiet avatar slavb18 avatar sortia avatar

Watchers

 avatar  avatar  avatar

posixuserjs's Issues

Реализовать объектную модель на ES6 c тестами

Реализовать объектную модель на ES6 c тестами
Использовать библиотеку posix

Видео для задания

  • User: hasGroup(groupName) используя posixgetgrnamgroup
  • RuUser: наследует класс User, переопределяет в конструкторе определение name через транслит
  • UserFactory: метод getCurrentUser()

пример блока кода

    let displayName = posixUser.gecos.split(' ');
    const lastName = displayName.pop();
    displayName.unshift(lastName);
    displayName = posixUser.name === posixUser.gecos ? posixUser.name : translitEnRu(displayName.join(' '));

Пример функций translit

const ru = ['щ', 'Щ', 'ё', 'ж', 'ч', 'ш', 'ъ', 'ы', 'э', 'ю', 'я', 'Ё', 'Ж', 'Ч', 'Ш', 'Ъ', 'Ы', 'Э', 'Ю', 'Я', 'а', 'б', 'в', 'г', 'д', 'е', 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ь', 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ь', '№'];
const en = ['shh', 'Shh', 'yo', 'zh', 'ch', 'sh', '``', 'y`', 'e`', 'yu', 'ya', 'Yo', 'Zh', 'Ch', 'Sh', '``', 'Y`', 'E`', 'Yu', 'Ya', 'a', 'b', 'v', 'g', 'd', 'e', 'z', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'x', 'c', '`', 'A', 'B', 'V', 'G', 'D', 'E', 'Z', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'F', 'X', 'C', '`', '#'];

const replaceArray = (find, replace, replaceString) => {
  let newReplaceString = replaceString;
  find.forEach((val, i) => {
    const f = new RegExp(val, 'g');
    newReplaceString = newReplaceString.replace(f, replace[i]);
  });

  return newReplaceString;
};

export const translitEnRu = (string) => {
  return replaceArray(en, ru, string);
};

export const translitRuEn = (string) => {
  return replaceArray(ru, en, string);
};

Нарисовать диаграмму классов в PlantUML

Нарисовать диаграмму классов в PlantUML

  • User: методы getUid(), getName(), getGroups(), hasGroup(groupName)
  • PosixUser: наследует класс User, переопределяет метод getGroups
  • UserFactory: метод getCurrentUser()
  • PosixUserFactory: переопределяет метод getCurrentUser()

Форкнуть проект, исправить файл docs/entities.puml и отправить Pull Request

Канал ITPatrol в Telegram

0-02-05-2c14947ec0f86a2ebba001e8872d4a7e42eae941c09b1685832df2ff4e8e4fb1_206581ad695599

Пример диаграммы из другой предметной области

@startuml

class Dossier <<Досье>> {
    addDocument()
    checkDocuments()
}

class DossierFile <<Документ досье>>{
    externalId <<Ссылка на документ>>
    status <<Статус>>
    addCorrection() <<Добавить корректировку>>
    addError() <<Добавить ошибку>>
}

Dossier *-- DossierFile


class CashReceipt <<Кассовый чек>> extends DossierFile{
    amount <<Сумма>>
}

@enduml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.