diff --git a/README.md b/README.md index 0feb146..ba81f52 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,20 @@ This is a simple utility to calculate the size of an item as [DynamoDB](https:// ## Usage ``` -var dynoItemSize = require('dyno-item-size'); -var item = { +const dynoItemSize = require('dyno-item-size'); +const item = { 'string': 'string', 'number': 27, 'buffer': new Buffer('buffer', 'utf8') }; -var size = dynoItemSize(item); +const size = dynoItemSize(item); console.log(size); // => 32 ``` ## API -`dynoItemSize` comes with a two helper functions to translate the size of an object into it's read or write capacity cost. +`dynoItemSize` comes with two helper functions to translate the size of an object into its read or write capacity cost. ### `dynoItemSize(object)` @@ -38,7 +38,7 @@ Takes an object like the one shown in usage and returns the write capacity cost. This module has been implemented by reading a few resources. -- [Item Size in DdynamoDB from stack overflow](http://stackoverflow.com/questions/8988389/itemsize-in-dynamodb) -- [Provision Throughput from the AWS DynamoDB docs](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html) +- [Item Size in DynamoDB from Stack Overflow](http://stackoverflow.com/questions/8988389/itemsize-in-dynamodb) +- [Provisioned Throughput from the AWS DynamoDB docs](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html) - [Naming Rules and Data Types](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) - [Item Sizes and Capacity Unit Consumption](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/CapacityUnitCalculations.html#ItemSizeCalculations.Reads)