semvec/pypi-packages huggingface dataset:
map-object 1.1.1
A method for mapping dict objects as if it were an array
License: MIT

Map Object
==========

A python implementation of the map-obj function

Installation
------------

``pip install map_object``

Usage
-----

.. code:: python

    from map_object import mapObject

    def mapper (key, value, source):
      return [value, ley]

    newObject = mapObject({'foo'='bar'}, mapper);
    # => {bar: 'foo'}

API
---

mapObject(source, mapper)
~~~~~~~~~~~~~~~~~~~~~~~~~

source
^^^^^^

Type: ``Object``

Source object to copy properties from.

mapper
^^^^^^

Type: ``Function``

Mapping function.

-  It has signature ``mapper(sourceKey, sourceValue, source)``
-  It must return a two item array: ``[targetKey, targetValue]``.

License
=======

MIT