Link Search Menu Expand Document

Padded picking

Table of contents

  1. Picking with padding

Picking with padding

/** Definining lists */
filterManager.install(
  closet.recipes.setList({ tagname: 'setl' }),
)

/** Picking and Evaluation with padding */
const postprocess = (value, valueList) => (tag) => {
  return value.padEnd(valueList.reduce((accu, value) => Math.max(accu, value.length), 0), ' ')
}

filterManager.install(
  closet.recipes.pick({ tagname: 'ppick', postprocess }),
  closet.recipes.pickIndex({ tagname: 'ppi', postprocess }),
  closet.recipes.pickCardNumber({ tagname: 'psel', postprocess }),
)
<pre>Numbers in a matrix ([[ppi::numbers[[setl::numbers::13553||-42||3.4||-2213498]]]], [[ppi1::numbers]])
                    ([[ppi2::numbers]], [[ppi3::numbers]])</pre>