Commits

Anonymous committed a47bcc5

Updated README

  • Participants
  • Parent commits b925f44

Comments (0)

Files changed (1)

 
 After this has run, the output will be the same as what was first submitted to the `multipoint.arr` function in the "Arrayify" example above.
 
+### Translate
+
+Translate is another useful function for converting object arrays with properties of one name to another format.  Consider the case where you have a library that defines a Vector as an object with `x` and `y` properties.  You then find another library that performs vector operations on `X` and `Y` properties. 
+
+Javascript being case sensitive will prevent you using library B with library A, however, using the `multipoint.translate` function you can potentially map simple object types from one type to another.  Prototypes will not be copied across, however, so if the library uses them you will probably need to implement some JS prototype magic to make everything work nicely.
+
+For a simple example, see the [translate test](/DamonOehlman/multipoint/blob/master/test/translate.js).
+
 ## Blocking vs. Non-Blocking Operations
 
 As many of you will know, Javascript is a single-threaded environment which means that any operations that take a significant amount of time will block the UI thread and cause lag in your application.  If you are using [NodeJS](http://nodejs.org/) or another server-side JS environment then blocking will affect your ability to serve other requests.