Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: yahoo/serialize-javascript

v1.6.0

24 Dec 14:34
@okuryu okuryu
v1.6.0
This tag was signed with the committer’s verified signature.
okuryu Ryuichi Okumura
GPG key ID: 451DB93FCDD9571E
Verified
Learn about vigilant mode.
8c10244
This commit was signed with the committer’s verified signature.
okuryu Ryuichi Okumura
GPG key ID: 451DB93FCDD9571E
Verified
Learn about vigilant mode.

Choose a tag to compare

Loading

v1.4.0

15 Jul 12:47
@okuryu okuryu
v1.4.0
This tag was signed with the committer’s verified signature.
okuryu Ryuichi Okumura
GPG key ID: 451DB93FCDD9571E
Verified
Learn about vigilant mode.

Choose a tag to compare

Loading

Improve Perf of Pure JSON Data

31 May 21:57
@ericf ericf

Choose a tag to compare

This minor release drastically improves the perf of serializing pure JSON data with the new {isJSON: true} flag. #17

Passing a replacer function to JSON.stringify() slows it down dramatically. If possible, we should avoid this this path, and the new isJSON option is the signal that the object passed-in contains no functions or regexp values. But still protect against XSS by properly escaping for a <script> context.

Node v0.12.10
simpleObj:
JSON.stringify( simpleObj ) x 1,303,349 ops/sec ±0.66% (99 runs sampled)
JSON.stringify( simpleObj ) with replacer x 386,634 ops/sec ±0.72% (96 runs sampled)
serialize( simpleObj ) x 284,535 ops/sec ±0.92% (98 runs sampled)
serialize( simpleObj, {isJSON: true} ) x 951,798 ops/sec ±0.92% (96 runs sampled)
Loading

Add Space Option

31 May 21:55
@ericf ericf

Choose a tag to compare

This minor release adds a space option that passes through to JSON.stringify's space option.

serialize({foo: 'foo'}, 2);
{
 "foo": "foo"
}
Loading

Improve Safety with Generated UIDs

09 Sep 17:12
@ericf ericf

Choose a tag to compare

There are no known exploits in the wild, but this improves the safety of this package.

This release fixes #5 by using generated UIDs and generated RegExps which use those UIDs making the placeholder token pattern used for serializing functions and regular expressions dynamic and unguessable.


Note: v1.1.0 and v1.1.1 have been unpublished from npm and PR #4 has been reverted because it was a hack and caused more problems than good.

Loading

Initial Release

16 Sep 17:38
@ericf ericf

Choose a tag to compare

The code in this package began its life as an internal module to express-state. To expand its usefulness, it now lives as serialize-javascript — an independent package on npm.

npm install serialize-javascript
Loading
1 3 Next

AltStyle によって変換されたページ (->オリジナル) /