File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,6 @@ var UNICODE_CHARS = {
2525 '\u2029' : '\\u2029'
2626} ;
2727
28- // There's an issue with Node 0.10 (V8 3.14.5.9) which causes `JSON.stringify()`
29- // and the subsequent `str.replace()` call to take over 100x more time than when
30- // a the `JSON.stringify()` replacer function is used and the data being
31- // serialized is very large (500KB). A remedy to this is setting the
32- // `JSON.stringify()` `space` option to a truthy value.
33- var SPACE = 2 ;
34-
3528module . exports = function serialize ( obj ) {
3629 var functions = [ ] ;
3730 var regexps = [ ] ;
@@ -50,7 +43,7 @@ module.exports = function serialize(obj) {
5043 }
5144
5245 return value ;
53- } , SPACE ) ;
46+ } ) ;
5447
5548 // Protects against `JSON.stringify()` returning `undefined`, by serializing
5649 // to the literal string: "undefined".
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ describe('serialize( obj )', function () {
4646 } ) ;
4747
4848 it ( 'should serialize JSON to a JSON string' , function ( ) {
49- expect ( serialize ( data ) ) . to . equal ( JSON . stringify ( data , null , 2 ) ) ;
49+ expect ( serialize ( data ) ) . to . equal ( JSON . stringify ( data ) ) ;
5050 } ) ;
5151
5252 it ( 'should deserialize a JSON string to a JSON object' , function ( ) {
You can’t perform that action at this time.
0 commit comments