Giter VIP home page Giter VIP logo

morphix's Introduction

Morphix

Coveralls Module Version Hex Docs Total Download License Last Updated

Tiny library of functions to perform transforms on maps and arrays.

Installation

The package can be installed from hex.pm

Add :morphix to your list of dependencies in mix.exs:

def deps do
  [
    {:morphix, "~> 0.8.0"}
  ]
end

Usage

See the Morphix module for details.

Copyright and License

Copyright (c) 2015 J. Paul Daigle

Released under the MIT License, which can be found in LICENSE.md.

morphix's People

Contributors

esse avatar joeyates avatar kianmeng avatar philosodad avatar shannonbrooks avatar sztheory avatar thbar avatar uberbrodt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

morphix's Issues

Non-utf8 binary crashes Morphix.atomorphiform

In Elixir you can have a map where keys are non-utf8 binary like this

%{<<255>> => 123}

Calling Morphix.atomorphiform crashes with following error:

%{<<255>> => 123} |> Morphix.atomorphiform
** (ArgumentError) argument error
    :erlang.binary_to_atom(<<255>>, :utf8)
    (morphix) lib/morphix.ex:534: Morphix.atomize_binary/2
    (morphix) lib/morphix.ex:517: anonymous fn/4 in Morphix.morphiform!/3
    (stdlib) maps.erl:257: :maps.fold_1/3
    (morphix) lib/morphix.ex:331: Morphix.atomorphiform/1

I think there are two different behaviors that would work better in this case. Either leave the binary unchanged, making %{<<255>> => 123} |> Morphix.atomorphiform a no-op (as you already do with numbers for example) or return an error tuple.

Tag v0.8.1

Thank you for releasing version 0.8.1 of this library. Would you please tag the code which was released to Hex for this version. Doing so will enable tooling like Dependabot to be able to build a changelog and determine the compatibility of version changes for package consumers.

Compilation Error on version 0.7.0

Hello,

I'm receiving the following error when trying to compile my app with version 0.7.0:

== Compilation error in file lib/morphix.ex ==
** (CompileError) lib/morphix.ex:862: imported Kernel.is_struct/1 conflicts with local function
    (elixir 1.10.3) src/elixir_locals.erl:94: :elixir_locals."-ensure_no_import_conflict/3-lc$^0/1-0-"/2
    (elixir 1.10.3) src/elixir_locals.erl:95: anonymous fn/3 in :elixir_locals.ensure_no_import_conflict/3
    (stdlib 3.9.2) erl_eval.erl:680: :erl_eval.do_apply/6

destructiform!

Turn nested structs into maps, removing any struct specific keys.

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.