Skip to content

Commit f33ea3c

Browse files
committed
Update CHANGELOG and README to reflect removal of support for functions, methods, and class instances in version 8.0.0; also remove related options from the codebase.
1 parent e4d79ba commit f33ea3c

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 8.0.0 (to be released)
2+
3+
#### Dropped support
4+
5+
- Removed support for stringify-ing functions and methods
6+
- Removed support for class instances, and convert them to plain objects
7+
- Removed the options related to functions & classes: `allowFunctions`, `allowClass` and `lazyEval`
8+
19
# v7.2.0 (Mon Aug 21 2023)
210

311
#### 🚀 Enhancement

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ Only relevant when using `stringify`.
115115

116116
`allowRegExp`: When set to false, regular expressions will not be serialized. (default = true)
117117

118-
`allowClass`: When set to false, class instances will not be serialized. (default = true)
119-
120118
`allowError`: When set to false, error instances will not be serialized. (default = true)
121119

122120
`allowDate`: When set to false, Date objects will not be serialized. (default = true)
@@ -125,12 +123,6 @@ Only relevant when using `stringify`.
125123

126124
`allowSymbol`: When set to false, Symbols will not be serialized. (default = true)
127125

128-
### reviver
129-
130-
`lazyEval`: When set to false, lazy eval will be disabled. (default true)
131-
132-
Note: disabling lazy eval will affect performance. Consider disabling it only if you truly need to.
133-
134126
## Requirements
135127

136128
`telejson` depends on the collection type `Map`. If you support older browsers and devices which may not yet provide these natively (e.g. IE < 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as `core-js` or `babel-polyfill`.

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export interface Options {
1717
allowError: boolean;
1818
maxDepth: number;
1919
space: number | undefined;
20-
lazyEval: boolean;
2120
}
2221

2322
export const isJSON = (input: string) => input.match(/^[\[\{\"\}].*[\]\}\"]$/);
@@ -316,7 +315,6 @@ const defaultOptions: Options = {
316315
allowError: true,
317316
allowUndefined: true,
318317
allowSymbol: true,
319-
lazyEval: true,
320318
};
321319

322320
export const stringify = (data: unknown, options: Partial<Options> = {}) => {

0 commit comments

Comments
 (0)