Лерна нужна чтоб мы могли объединить два рабочих проэета с меньшими усилиями.
Она позволяет изолировать готовые проэкты, со свомим системами билдеров, конфигами, версиями пакетов
Так же создавать рядом новый проэкт (кор)
и подлючать кор в другие проэкты
Так же она нам поможет по этапно унифицировать билдеры конфиги и пакеты в проэктах
и выносить их в рут для всех проэктов
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
console.log('script error test') | |
setTimeout(() => { | |
Promise.af.krek | |
throw new Error('error_script') | |
}, 3000) |
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
import React, { useState } from 'react' | |
const Nothing = Symbol() | |
const normDoubleSymbol = (strOrNumber: string | number) => strOrNumber.toString().length === 1 | |
? `0${strOrNumber}` | |
: strOrNumber.toString() |
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
export type RGBA = [number, number, number, number | undefined] | |
export const splitStringChunk = (string: string, size: number): string[] => { | |
const re = new RegExp(".{1," + size + "}", "g") | |
const maybeResult = string.match(re) | |
return maybeResult ? maybeResult : [] | |
} | |
export const hexToRGB = (hex: string): RGBA => { | |
if (hex.length !== 3 && hex.length !== 6 && hex.length !== 8) { |
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
export class Input extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
mask: props.mask && props.maskValidate ? new Mask() : null | |
} | |
} | |
onChangeMask = (event) => { |
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
/* | |
check next problenm: | |
Property and value: | |
references | |
defaultValue | |
onDelete | |
onUpdate | |
Tyoes: |
Функциоанльный стейт это - функция которая возвращает пару, где первый элемент активный, а второй представляет хранилище. По дефолту второй элемент такого же типа как и первый, это значит если оба параметра пары будут Int, то в хранилище мы сможем хранить только один элемент. Позже мы расмотрим вариант где второй параметр будет списком, а пока давайте разберемся с концепцией функциоанльного стейта.
И так - как же нам записать в функцию что-то? как функция может хранить значение?
type State<A> = () => A
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
let text = ` | |
Баланс и оплата | |
Как получить выйгрыш? | |
Деятельность приема от физичиских лиц .... | |
Как пополнить баланс? | |
Для того чтоб пополнить баланс, надо быть в | |
- банде Балансов | |
Идентификацияbeecoder | |
Где посмотреть точки? | |
Там и тут ... |
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
const multiSplit = (str, delimeters) => { | |
let right = str; | |
const result = []; | |
for (let i = 0; i < delimeters.length; i++) { | |
const indexDel = right.indexOf(delimeters[i]); | |
if (indexDel === -1) continue; | |
result.push(right.slice(0, indexDel)); | |
right = right.slice(indexDel + 1); | |
} |
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
import React, { Fragment, useState, useEffect } from "react" | |
export const types = { | |
text: (a) => ({ type: 'text', payload: a }), | |
password: (a) => ({ type: 'text', payload: a }), | |
checkbox: (a) => ({ type: 'checkbox', payload: a }), | |
checkboxGroup: (a) => ({ type: 'checkbox-group', payload: a }), | |
radio: (a) => ({ type: 'radio', payload: a }), | |
file: (filename, file) => ({ type: 'file', payload: { filename, file } }), | |
selectOne: (a) => ({ type: 'select-one', payload: a }), |
NewerOlder