.
├── index.ios.js
├── js
│ ├── actions
│ │ ├── ChatServerActionCreators.js
│ │ └── ChatThreadActionCreators.js
│ ├── components
│ │ ├── ChatScreen
│ │ │ ├── index.js
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": "@monorepo/root", | |
| "private": true, | |
| "workspaces": { | |
| "packages": [ | |
| "packages/*" | |
| ], | |
| "main": "index.ts", | |
| "nohoist": [ | |
| "**/tslint-eslint-rules", |
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
| export function TakeIf<T>(func: (data: T) => boolean, validationOptions?: ValidationOptions) { | |
| return (object: T, propertyName: string) => { | |
| const args: ValidationMetadataArgs = { | |
| validationOptions, | |
| propertyName, | |
| type: ValidationTypes.CONDITIONAL_VALIDATION, | |
| target: object.constructor, | |
| constraints: [(obj: any, _: any) => { | |
| const isOptional = func(obj); |
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
| function get<B, C = undefined>(func: () => B, defaultValue?: C): B | C | undefined { | |
| try { | |
| const value = func(); | |
| if (typeof value === 'undefined') { | |
| return defaultValue; | |
| } | |
| return value; | |
| } catch { | |
| return defaultValue; |
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
| Parent Component: | |
| ... | |
| provide () { | |
| return { parentValidator: this.$validator } | |
| }, | |
| ... | |
| Child Component: |
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
| // Create script tag | |
| const stripeScript = document.createElement('script'); | |
| //add necessary html attributes | |
| stripeScript.setAttribute('type', 'text/javascript'); | |
| stripeScript.setAttribute('src', 'https://js.stripe.com/v3/'); | |
| // add listener for which will trigger when script will fully loaded | |
| stripeScript.addEventListener('load', () => { | |
| console.log(window['Stripe']); |
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
Show hidden characters
| { | |
| "extends": [ | |
| "tslint:latest", | |
| "tslint-eslint-rules", | |
| "tslint-config-prettier" | |
| ], | |
| "rulesDirectory": [ | |
| "node_modules/codelyzer", | |
| "node_modules/tslint-origin-ordered-imports-rule/dist", | |
| "node_modules/tslint-consistent-codestyle/rules", |
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
| adb logcat *:S ReactNative:V ReactNativeJS:V |
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
| #!/bin/sh | |
| PNUMPER=$1; | |
| kill -9 `lsof -w -n -i tcp:$PNUMPER| awk '{print $2}'|awk 'END{print}'`; | |
| #killport {{PORT}} |
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
| import { Injectable } from '@angular/core'; | |
| import { BaseRequestOptions, RequestOptions } from '@angular/http'; | |
| import { AuthService } from './auth.service'; | |
| @Injectable() | |
| export class DefaultRequestOptions extends BaseRequestOptions { | |
| constructor(private authService: AuthService) { | |
| super(); |
NewerOlder