GithubHelp home page GithubHelp logo

imuta's Introduction

Imuta

Simple js library to make your functional code better :)

Install

bower install imuta --save

Main functions reference

  • Imuta.clone(any_term) -> any_term : recursively clone any js term and return its copy
  • Imuta.equal(term_a,term_b) -> boolean : recursively compare any pair of js terms by values
  • Imuta.flatten(list) -> list : recursively make new flatten list from any list(of lists of lists etc / or any terms), recursively clone all its elemets
  • Imuta.put_in(obj, path, value) -> puts clone of value to nested path of structure obj
  • Imuta.get_in(obj, path) -> gets clone of value from nested path of structure obj.. if not exisits returns undefined
  • Imuta.update_in(obj, path, func) -> updates value in nested path of structure obj.. if not exisits - raise exception

And some simple boolean functions

  • is_undefined(t)
  • is_boolean(t)
  • is_number(t)
  • is_string(t)
  • is_function(t)
  • is_null(t)
  • is_list(t)
  • is_map(t)

WARNING

Cyclic references always gives stack overflow!!!

imuta's People

Contributors

timcf avatar

Stargazers

Alexandr Gorlov avatar Vlad Trukhin avatar lagleki avatar Vladimir avatar

Watchers

James Cloos avatar  avatar

imuta's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.