1.0.0 • Published 7 years ago

pledgerize v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

pledgerize

installation

$ npm install --save pledgerize

usage

This:

const result = pledgerize([
  'project',
  'project2',
  'project',
], (projectName) => {
    return promiseReturningFunction(projectName);
})

Does the same as this:

const result = promiseReturningFunction('project')
    .then(() => {
       promiseReturningFunction('project2')
    })
    .then(() => {
       promiseReturningFunction('project')
    })

why?

This came about when I was creating a script to migrate remote repositories and their 'namespaces'. If a namespace didn't exist at the destination it was created, to avoid errors, I wanted to process each repository sequentially.