npm i class-validator class-transformer
import { IsOptional, IsIn, IsNotEmpty } from 'class-validator';| version: '3.1' | |
| services: | |
| mongo-setup: | |
| container_name: mongo-setup | |
| image: mongo | |
| restart: on-failure | |
| networks: | |
| default: | |
| volumes: |
| import * as Joi from '@hapi/joi' | |
| import { Body, Controller, Module, NotImplementedException, Post, UsePipes } from '@nestjs/common' | |
| import { NestFactory } from '@nestjs/core' | |
| import axios from 'axios' | |
| import * as Joiful from 'joiful' | |
| import { ValidationPipe } from './validation.pipe' | |
| class Implicit { | |
| @Joiful.string().required() |
| import { object, string, number, ValidationError } from '@hapi/joi'; | |
| const schema = object({ | |
| searchCode: string() | |
| .required() | |
| .label('Search code'), | |
| id: number().required() | |
| }), | |
| messages = { | |
| 'alternatives.all': '{{#label}} does not match all of the required types', |
| --- | |
| format_version: '7' | |
| default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
| project_type: react-native | |
| trigger_map: | |
| - push_branch: "*" | |
| workflow: primary | |
| - pull_request_source_branch: "*" | |
| workflow: primary | |
| workflows: |
| import React from 'react'; | |
| import { Text, View, SafeAreaView, FlatList, WebView, Dimensions, Button, ScrollView} from 'react-native'; | |
| import { ListItem } from 'react-native-elements'; | |
| import ApolloClient from "apollo-boost"; | |
| import gql from "graphql-tag"; | |
| import { ApolloProvider } from "react-apollo"; | |
| import { Query } from "react-apollo"; | |
| import HTML from 'react-native-render-html'; | |
| import { createAppContainer, createStackNavigator} from 'react-navigation'; |
| import { useState, useEffect } from 'react'; | |
| // Usage | |
| function App() { | |
| const status = useScript( | |
| 'https://pm28k14qlj.codesandbox.io/test-external-script.js' | |
| ); | |
| return ( | |
| <div> |
| import { useState, useEffect } from 'react'; | |
| // Usage | |
| function App() { | |
| // Call our hook for each key that we'd like to monitor | |
| const happyPress = useKeyPress('h'); | |
| const sadPress = useKeyPress('s'); | |
| const robotPress = useKeyPress('r'); | |
| const foxPress = useKeyPress('f'); |
| import { useState } from 'react'; | |
| // Usage | |
| function App() { | |
| // Similar to useState but first arg is key to the value in local storage. | |
| const [name, setName] = useLocalStorage('name', 'Bob'); | |
| return ( | |
| <div> | |
| <input |