Created
February 6, 2018 00:28
-
-
Save ealsur/b0c0d03a98ed4ab3715b01f6a1d4e03c to your computer and use it in GitHub Desktop.
Azure Cosmos DB + Functions Cookbook - live migration index.js
This file contains 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
module.exports = function(context, input) { | |
if(!!input && input.length > 0){ | |
context.bindings.docsToSave = []; | |
for(let i = 0, len=input.length; i<len;i++){ | |
const doc = input[i]; | |
// Do something here with the doc or create a new one | |
context.bindings.docsToSave.push(doc); | |
} | |
} | |
context.done(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment