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
| createObjFromUrl(uriString){ | |
| if (uriString && typeof uriString === 'string' && uriString.includes('=')) { | |
| uriString = uriString.split('&').map((item) => item.split('=')); | |
| let urlObject = {}; | |
| uriString.forEach((i) => { urlObject[i[0]] = i[1]; }); | |
| return urlObject; | |
| } else { | |
| console.warn('Cannot parse that string: ' + uriString); | |
| return {}; | |
| } |
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
| const processors = { | |
| paypal: { | |
| checker: urlParams.PayerID && urlParams.paymentId && urlParams.token, | |
| resolver: () => { | |
| this.savePaypalPayment(urlParams).then( | |
| () => this.toast.success('Payment is successfull'), | |
| e => this.toast.error(e || 'Payment is not successfull'), | |
| ); | |
| }, | |
| }, |
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
| const autoprefixer = require('autoprefixer'); | |
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
| const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
| const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
| const eslintFormatter = require('react-dev-utils/eslintFormatter'); |
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
| const autoprefixer = require('autoprefixer'); | |
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
| const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
| const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
| const eslintFormatter = require('react-dev-utils/eslintFormatter'); |
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
| /** | |
| * NEAT FETCH | |
| * | |
| * In the process of communicating with the server, | |
| * we have a lot of places where there will be an error. | |
| * | |
| * The main purpose of this code is to unify the response even in case of an error. | |
| * If we know exactly what the object function will return, | |
| * the code will be easier to debug and work more reliably. | |
| * |
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
| { | |
| "name": "door-code", | |
| "version": "0.1.0", | |
| "private": true, | |
| "scripts": { | |
| "serve": "vue-cli-service serve", | |
| "build": "vue-cli-service build", | |
| "test": "vue-cli-service test", | |
| "lint": "vue-cli-service lint" | |
| }, |
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
| const childs = [ | |
| { | |
| id: 'foo|bar|baz|bug', | |
| name: 'foo, bar, baz, bugger', | |
| }, | |
| { | |
| id: 'foo', | |
| name: 'foorer' | |
| }, | |
| { |
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
| activate() { | |
| this.pipeline = { | |
| A_requestModel: () => { | |
| this.params.loading = true; | |
| return this.get(newRequest(this.params)); | |
| }, | |
| B_requestDataOnce: () => { | |
| const state = this.store.getState(); | |
| this.constants = state.constants; | |
| this.currentUser = state.currentUser; |
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
| // Realization | |
| function startPipeline(pipelineRequests, order) { | |
| order = order || [ | |
| 'before', | |
| 'requestModel', | |
| 'after', | |
| 'stateToModel', | |
| 'setValidations' |
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
| const re = /^(?:(?:https?|[\w]*):((\/\/)[\w\d]|[\w\d+])).*/gm; | |
| // VALID | |
| tel:+12123123123123 | |
| http://asdasdasd.com | |
| http://ru.asdasdasd.com | |
| https://ru.asdasdasd.com | |
| https://123sdasdasd.com | |
| https://123sdasdasd.com/%D1%84%D1%8B%D0%B2%D1%84%D1%8B%D0%B2%D1%84%D1%8B%D0%B2 | |
| tg://asdasd |