Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

readme update

  • Loading branch information...
commit cd9c00d26a2171f0d7d3d4ba54bfbcd334b73489 1 parent c0f5435
Hunter Loftis authored January 03, 2013

Showing 1 changed file with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. 20  README.md
20  README.md
Source Rendered
@@ -25,7 +25,7 @@ $ npm install cryo
25 25
 Add the [latest minified build](https://github.com/hunterloftis/cryo/tree/master/build) to your project as a script:
26 26
 
27 27
 ```html
28  
-<script type='text/javascript' src='cryo-0.0.2.min.js'></script>
  28
+<script type='text/javascript' src='cryo-0.0.3.min.js'></script>
29 29
 ```
30 30
 
31 31
 ## Example
@@ -50,25 +50,24 @@ hydrated.hello(); // Hunter says hello!
50 50
 
51 51
 ### Undefined
52 52
 
53  
-`JSON.stringify()` doesn't store undefined values.
54  
-This is frequently desired behavior, but Cryo's goal is to capture a verbatim snapshot of the target object.
55  
-Undefined keys are still keys that exist in a container, so Cryo restores them to undefined values in `parse()`.
  53
+`JSON.stringify()` loses undefined values.
  54
+Cryo keeps them, since its goal is a verbatim snapshot of your object and all of its properties.
56 55
 
57 56
 - [Undefined tests](https://github.com/hunterloftis/cryo/blob/master/test/null.test.js)
58 57
 
59 58
 ### Date
60 59
 
61  
-`JSON.stringify()` converts Date objects to strings.
62  
-Cryo maintains Date objects so the parsed value is identical to the stringified value.
  60
+`JSON.stringify()` loses Date objects, converting them to strings.
  61
+Cryo maintains Date objects as Date objects and restores them in `Cryo.parse()`.
63 62
 
64 63
 - [Date tests](https://github.com/hunterloftis/cryo/blob/master/test/date.test.js)
65 64
 
66 65
 ### References
67 66
 
68  
-JSON.stringify() replaces Object references with clones of data.
69  
-When several references to the same object are stringified, those references will becomes separate clones of the object's data on JSON.parse().
  67
+`JSON.stringify()` makes multiple copies of single objects, losing object relationships.
  68
+When several references to the same object are JSON stringified, those references are turned into clones of each other.
70 69
 Cryo maintains object references so the restored objects are identical to the stringified objects.
71  
-For example:
  70
+This is easier to understand with an example:
72 71
 
73 72
 ```js
74 73
 var Cryo = require('../lib/cryo');
@@ -90,6 +89,9 @@ console.log(withCryo.activeUser === withCryo.users[1]);   // true
90 89
 
91 90
 ### Infinity
92 91
 
  92
+`JSON.stringify(Infinity)` returns `null`, even though `Infinity` is a numeric type in JavaScript.
  93
+Cryo successfully stringifies and parses `Infinity` as a `Number`.
  94
+
93 95
 - [Infinity tests](https://github.com/hunterloftis/cryo/blob/master/test/number.test.js)
94 96
 
95 97
 ### Functions

0 notes on commit cd9c00d

Please sign in to comment.
Something went wrong with that request. Please try again.