josdejong/mathjs

`transform` should accept and compose multiple transforms

Aperta

#2568 aperta il 20 mag 2022

 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (1314 fork)batch import
featurehelp wanted

Metriche repository

Star
 (15.065 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Per discussion here, it would be great to be able to pass multiple transforms to the transform function and have them be composed

e.g.

myNode.transform(transform1, transform2)
myNode.transform([transform1, transform2])

which would be equivalent to

myNode.transform(node => transform1(transform2(node))

or

myNode
  .transform(transform1)
  .transform(transform2)

Happy to take this on, just adding a task for it here in the mean time

Guida contributor