Driven by UTS
- Create Collection
- typeName
| // upload.js, from https://github.com/googledrive/cors-upload-sample | |
| // Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain | |
| // License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Implements Resumable Upload for Google Drive as described by | |
| // https://developers.google.com/drive/v3/web/resumable-upload | |
| // | |
| // Modified by Paul Brewer, Economic and Financial Technology Consulting LLC | |
| // Nov. 1 2017 | |
| // 1. use Google Drive API V3 instead of V2 |
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| // Get request and request headers | |
| const request = event.Records[0].cf.request; | |
| const headers = request.headers; | |
| // Configure authentication | |
| const authUser = 'user'; | |
| const authPass = 'pass'; |
| // Type Map | |
| { | |
| PrimitiveType: { | |
| name: 'PrimitiveType', | |
| label: 'Primitive Type', | |
| primitive: true | |
| }, | |
| AnotherType: { | |
| name: 'AnotherType', | |
| label: 'Another Type', |
Driven by UTS
| // Query | |
| { | |
| type: 'OR_SET', | |
| data: [ | |
| { | |
| type: 'AND_SET', | |
| data: [ | |
| { | |
| type: 'CONDITION', | |
| fieldName: 'myField', |
| // JSDI | |
| class K{ | |
| handler; | |
| constructor(handler){ | |
| this.handler = handler; | |
| } | |
| exec() { |
| function collate(pages = []){ | |
| const flats = []; | |
| const { length } = pages; | |
| const flatLength = Math.ceil(length/2); | |
| const even = length % 2 === 0; | |
| const newPages = [...pages]; | |
| if(!even){ | |
| const lastPage = newPages.pop(); | |
| import React, { Component } from 'react'; | |
| export default class FluxDI { | |
| static validateContextName(name){ | |
| if(typeof name !== 'string'){ | |
| throw new Error('`name` must be a string.'); | |
| } | |
| } | |
| function Bindable(ClassRef, onChangeMethodName){ | |
| class BindableClass{ | |
| constructor(...args){ | |
| const instance = new (ClassRef.bind(this))(...args); | |
| for(const k in instance){ | |
| if(instance.hasOwnProperty(k)){ | |
| const initialValue = instance[k]; | |
| const privatePropertyName = `_${k}`; | |
| instance[privatePropertyName] = initialValue; |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "PublicReadGetObject", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "*" | |
| }, | |
| "Action": "s3:GetObject", |