Skip to content
View sdawood's full-sized avatar

Block or report sdawood

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. dynamo-update-expression dynamo-update-expression Public

    Generate DynamoDB Update Expression by diff-ing original and updated documents

    JavaScript 27 3

  2. json-tots json-tots Public

    JSON Template of Templates

    JavaScript 9 4

  3. functional-pipelines functional-pipelines Public

    functional pipelines for Java Script

    JavaScript 7

  4. pipe and compose pipe and compose
    1
    const pipe = (...fns) => fns.reduceRight((f, g) => (...args) => f(g(...args)));
    2
    
                  
    3
    const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));
    4
    
                  
    5
    const add10 = x => x + 10;
  5. Async Wrapper for DocumentClient.query Async Wrapper for DocumentClient.query
    1
    async function query(table, {keyConditionExpression, expressionAttributeValues} = {}, options = {}, params = {}) {
    2
        const docClient = new AWS.DynamoDB.DocumentClient({...options});
    3
        const requiredParams = {
    4
            TableName: table,
    5
            KeyConditionExpression: keyConditionExpression,
  6. Transducer with Array.reduce() Transducer with Array.reduce()
    1
    const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));
    2
    
                  
    3
    // plain old mapping functions
    4
    const add10 = x => x + 10;
    5
    const square = x => x * x;