updeep - Easily update nested frozen objects and arrays in a declarative and immutable manner.

  •        6

Easily update nested frozen objects and arrays in a declarative and immutable manner. updeep makes updating deeply nested objects/arrays painless by allowing you to declare the updates you would like to make and it will take care of the rest. It will recursively return the same instance if no changes have been made, making it ideal for using reference equality checks to detect changes (like PureRenderMixin).

https://github.com/substantial/updeep

Dependencies:

lodash : ^4.2.0

Tags
Implementation
License
Platform

   




Related Projects

icepick - Utilities for treating frozen JavaScript objects as persistent immutable collections

  •    Javascript

Utilities for treating frozen JavaScript objects as persistent immutable collections. Object.freeze() is a quick and easy way to get immutable collections in plain JavaScript. If you recursively freeze an object hierarchy, you have a nice structure you can pass around without fear of mutation. The problem is that if you want to modify properties inside this hierarchical collection, you have to return a new copy with the properties changed.

derivablejs - Functional Reactive State for JavaScript and TypeScript

  •    Javascript

Derivables are an Observable-like state container with superpowers. Think MobX distilled to a potent essence, served with two heaped tablespoons of extra performance, a garnish of declarative effects management, and a healthy side-salad of immutability. Atoms are simple mutable references to immutable values. They represent the ground truth from which all else is derived.

awesome-fp-js - :sunglasses: A curated list of awesome functional programming stuff in js

  •    

This is a curated list of awesome functional programming code and learning resources for JavaScript. As a multi-paradigm programming language, JavaScript can be written in many styles. With these resources we want to help you to make better use of JavaScript’s support for writing programs in a functional way. Functional programming is a style of programming which models computations as the evaluation of expressions. Contrast this with imperative programming where programs are composed of statements which change global state when executed. Functional programming typically avoids using mutable state and favors side-effect free functions and immutable data instead. This encourages writing composable and declarative programs that are easy to reason about.

list - 🐆 An immutable list with unmatched performance and a comprehensive functional API.

  •    TypeScript

A fast immutable list with a functional API. List is a purely functional alternative to arrays. It is an implementation of a fast persistent sequence data structure. Compared to JavaScript's Array List has three major benefits.

pyrsistent - Persistent/Immutable/Functional data structures for Python

  •    Python

Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in the sense that they are immutable. All methods on a data structure that would normally mutate it instead return a new copy of the structure containing the requested updates. The original structure is left untouched.


Immutable-js - Immutable persistent data collections for Javascript which increase efficiency and simplicity

  •    Javascript

Immutable data cannot be changed once created, leading to much simpler application development, no defensive copying, and enabling advanced memoization and change detection techniques with simple logic. Persistent data presents a mutative API which does not update the data in-place, but instead always yields new updated data.

Paguro - Immutable Collections and Functional Transformations for the JVM

  •    Java

Immutable Clojure collections and a Transformation abstraction for Java 8+, immutably, type-safely, and with good performance. It provide support for RRB Tree, which is an immutable List (like Clojure's PersistentVector) that also supports random inserts, deletes, and can be split and joined back together in logarithmic time.

precept - A declarative programming framework

  •    Clojure

This will start the todomvc example on localhost:3449 and a nREPL server on localhost:7002. You can interact with the code by calling (cljs) once your REPL is connected. Precept is a framework for creating reactive web applications using a rules engine, declarative logic, and relational data modeling.

bifurcan - impure functional data structures

  •    Java

This library provides high-quality Java implementations of mutable and immutable data structures, each sharing a common API. Rather than using the existing collection interfaces in java.util such as List or Map, it provides its own interfaces (IList, IMap, ISet) that provide functional semantics - each update to a collection returns a reference to a new collection.

Vavr - Object-functional language extension to Java

  •    Java

Vavr is an object-functional language extension to Java 8, which aims to reduce the lines of code and increase code quality. It provides persistent collections, functional abstractions for error handling, concurrent programming, pattern matching and much more.

omniscient - A library providing an abstraction for React components that allows for fast top-down rendering embracing immutable data for js

  •    Javascript

We can happily announce that as of React 16.6, Omniscient.js can enjoy retirement after a job well done. The new React.memo API can for most cases replace the Omniscient decorator with your own areEqual function. It's not exactly the same, but we feel that it is close enough for most cases. Thanks for supporting Omniscient all these years. Do fast top-down rendering embracing immutable data and functional programming.

language-ext - C# functional language extensions - a base class library for functional programming

  •    CSharp

This library uses and abuses the features of C# 6+ to provide a functional 'Base class library', that, if you squint, can look like extensions to the language itself.language-ext is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome backers. If you'd like to join them, check out the language-ext Patreon campaign. Or if you'd just like to help support the coffee fund, that is very welcome too!.

Scala Language - Object-Oriented Meets Functional

  •    Java

Scala is a pure-bred object-oriented language. Conceptually, every value is an object and every operation is a method-call. The language supports advanced component architectures through classes and traits. Even though its syntax is fairly conventional, Scala is also a full-blown functional language. It has everything you would expect, including first-class functions, a library with efficient immutable data structures, and a general preference of immutability over mutation.

cycle-react - Rx functional interface to Facebook's React

  •    Javascript

An RxJS functional interface to Facebook's React. Cycle-React allows users to write React applications in functional style and represents their UIs as Observables. In addition, Cycle-React is immutable and optimizes the component updates internally by default.

bindonce - Zero watches binding for AngularJs

  •    Javascript

Here is an example of how AngularJs can freeze your UI, try to press and hold a key inside the input field, when the table is filled with only 1 person everything is ok, you can see how the DOM is updated by the input in real time, however if you try to load 1000 person (or even 500 if the testing device is not powerfull) and repeat the experiment you can see how the UI is frozen. In this other demo BindOnce will take care of your watchers and the UI will be reactive as it should be. The code is the same for both demos, the only difference is that I replaced any ng-* tag inside the table with the equivalent bo-* tag. AngularJs provides a great data binding system but if you abuse of it the page can run into some performance issues, it's known that more of 2000 watchers can lag the UI and that amount can be reached easily if you don't pay attention to the data-binding. Sometime you really need to bind your data using watchers, especially for SPA because the data are updated in real time, but often you can avoid it with some efforts, most of the data presented in your page, once rendered, are immutable so you shouldn't keep watching them for changes.

frozen - a header-only, constexpr alternative to gperf for C++14 users

  •    C++

Header-only library that provides 0 cost initialization for immutable containers and various algorithms. The unordered_* containers are guaranteed perfect (a.k.a. no hash collision) and the extra storage is linear with respect to the number of keys.

immutable-ext - fantasyland extensions for immutablejs

  •    Javascript

Plus stuff that builds off of reduce like foldMap. Please contribute/complain as you want/need things.

baobab - JavaScript persistent and optionally immutable data tree with cursors.

  •    Javascript

Baobab is a JavaScript persistent and immutable (at least by default) data tree supporting cursors and enabling developers to easily navigate and monitor nested data through events. It is mainly inspired by functional zippers (such as Clojure's ones) and by Om's cursors.

react-cursor - Immutable state for React.js

  •    Javascript

Cursors are a tool for working with recursive or deeply nested data, immutably. react-cursor is a javascript port of an abstraction that I first saw in ClojureScript. This implementation is decoupled from any rendering library and is very small. Cursors are useful in UI programming, because UIs are tree shaped and naturally have tree-shaped state. Cursors let your app hold all its state in one place at the root of the UI tree; thus the root is stateful, and all downtree views are stateless.

partial.lenses - Partial lenses is a comprehensive, high-performance optics library for JavaScript

  •    Javascript

We ultimately want to present the user with a rich enough editor, with features such as undo-redo and validation, for manipulating the content represented by those JSON objects. The titles property is really just one tiny part of the data model, but, in this tutorial, we only look at it, because it is sufficient for introducing most of the basic ideas. Furthermore, when updating, inserting, and removing texts, we'd like the operations to treat the JSON as immutable and create new JSON objects with the changes rather than mutate existing JSON objects, because this makes it trivial to support features such as undo-redo and can also help to avoid bugs associated with mutable state.





We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.