josdejong/mathjs

`transform` should accept and compose multiple transforms

Open

#2568 aperta il 20 mag 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (1298 fork)batch import
featurehelp wanted

Metriche repository

Star
 (13.832 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

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