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
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| * @flow strict-local | |
| */ | |
| import React from 'react'; | |
| import {View, Text, StyleSheet, Dimensions, StatusBar} from 'react-native'; |
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 React from 'react'; | |
| // Either use a config file or env file | |
| import { API_URL, HOME_PAGE_URL } from '../config'; | |
| const initialCtx = { | |
| NetworkCtx: { | |
| apiUrl: API_URL, token: null, homePage: HOME_PAGE_URL | |
| }, | |
| setNetworkCtx: () => null | |
| } |
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 { _AccountServiceWrapper, AccountServiceWrapper } from './accountService'; | |
| describe('Get Account Information', () => { | |
| test('should account type be lease', () => { | |
| const spy = jest.spyOn(_AccountServiceWrapper, 'getAccountByAccountNumberAndCountry'); | |
| let accountData = _AccountServiceWrapper.getAccountByAccountNumberAndCountry(); | |
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
| async function validator(requestObject, validatingObj){ | |
| let paramsError = { | |
| missingParams: [], | |
| invalidParams: [], | |
| message: '' | |
| } | |
| function constructMessage(_paramsError){ | |
| let missingParamsMsg = `Missing the following parameters ${_paramsError.missingParams.join()}`; |
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 enum ProperType { | |
| Lease, Rent, Own | |
| } | |
| export interface PayOffQuote { | |
| quoteDate: Date, | |
| goThroughDate: Date, | |
| ResidualValue: BigInteger, | |
| propertyType: ProperType, | |
| PayOFfTax: BigInteger, |
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
| var fetch = require('node-fetch'); | |
| const apiUrl = 'https://jsonplaceholder.typicode.com/users'; | |
| //Async await method | |
| var fetchUsers = async () => { | |
| var response = await fetch(apiUrl); | |
| var data = response.json(); | |
| return data; | |
| } |
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
| { | |
| "scripts": { | |
| "build": "babel ./src --out-dir build --extensions \".ts\"", | |
| "serve": "nodemon build/index.js", | |
| "type-check": "tsc --noEmit", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "dependencies": { | |
| "express": "^4.16.4" | |
| }, |
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
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // choose either `'stable'` for receiving highly polished, | |
| // or `'canary'` for less polished but more frequent updates | |
| updateChannel: 'stable', |
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
| { | |
| "env": { | |
| "browser": true, | |
| "commonjs": true, | |
| "es6": true, | |
| "node": true | |
| }, | |
| "parser": "babel-eslint", | |
| "extends": ["standard","eslint:recommended", "plugin:react/all"], | |
| "parserOptions": { |
NewerOlder