Can transformations be immutable?
See original GitHub issueIs it possible to modify nodes in an immutable way? eg,
// Redact all text nodes
node = visit(node, (child) => {
if (child.type === 'text') {
return { ...child, value: '[redacted]' }
}
})
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Transformation for Class Immutability - Fredrik Kjolstad
If a class is class immutable, none of its instances can be transitively mutated. Examples in Java include String and the classes in...
Read more >Declarative and Immutable Pipeline of Transformations
Well, as much as it's possible. Let's say you have a document, and you have a collection of transformations, each of which will...
Read more >Model Transformation with Immutable Data - CWI Amsterdam
Abstract. Mainstream model transformation tools operate on graph structured models which are described by class-based meta-models. In the traditional gram-.
Read more >The 4 Immutable Laws of Transformation - Impruver.com
It turns out that there's a science to transformation, which have been codified into 4 laws. This article will discuss this science and...
Read more >The Four Immutable Laws of Transformation - LinkedIn
It turns out that there's a science to transformation, which have been codified into 4 laws. This article will discuss this science and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
unist-util-visit
is almost always good enough, andunist-util-visit-parents
(used in the former) if you need to access all parentsYes, I do. Plugins are always the slowest in the unified process. Copying a syntax-tree for 1mb of say markdown is a gigantically slow operation. Mutating a couple of things is faster.