awslabs/dynamodb-document-js-sdk — pull request #15 by modellurgist (2014-11-20 14:53:10+00:00)
Title: Address type error in DynamoDBDatatype.formatWireType

- when calling client.getItem
- when Item has an Array
- when call is made in context of Ember framework (or any content that extends Array.protoype)

I encountered when giving this lib a quick try within the context of a simple Ember app using default settings (i.e. not disabling the prototype extensions).

Granted, this concern seems to be the responsibility of the library caller, but to the extent you want to support this case, the given solution here would work (as indicated by the included Mocha test). To spread adoption, I assume you might want to remove any possible barrier (even silly ones not of your own making). It would also help me to avoid the need to disable the Ember default behavior.

Another solution would be to break out `L` and `M` into separate cases in `DynamoDBDatatype.formatWireType` and iterate over the array case using
```
for (var i=0; i < value.length; i++) {...}
```

For more information:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in#Iterating_over_own_properties_only
- http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/