serialize-javascript/000755 001751 000177 0000000000 14522451650016700 5ustar00runner000000 000000 1452245165014522451650serialize-javascript/LICENSE000644 001751 000177 0000002165 14522451650017711 0ustar00runner000000 000000 1452245165014522451650 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE serialize-javascript/README.md000644 001751 000177 0000004715 14522451650020166 0ustar00runner000000 000000 1452246171214522451650# Installation > `npm install --save @types/serialize-javascript` # Summary This package contains type definitions for serialize-javascript (https://github.com/yahoo/serialize-javascript). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serialize-javascript. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serialize-javascript/index.d.ts) ````ts declare namespace serializeJavascript { interface SerializeJSOptions { /** * This option is the same as the space argument that can be passed to JSON.stringify. * It can be used to add whitespace and indentation to the serialized output to make it more readable. */ space?: string | number | undefined; /** * This option is a signal to serialize() that the object being serialized does not contain any function or regexps values. * This enables a hot-path that allows serialization to be over 3x faster. * If you're serializing a lot of data, and know its pure JSON, then you can enable this option for a speed-up. */ isJSON?: boolean | undefined; /** * This option is to signal serialize() that we want to do a straight conversion, without the XSS protection. * This options needs to be explicitly set to true. HTML characters and JavaScript line terminators will not be escaped. * You will have to roll your own. */ unsafe?: true | undefined; /** * This option is to signal serialize() that we do not want serialize JavaScript function. * Just treat function like JSON.stringify do, but other features will work as expected. */ ignoreFunction?: boolean | undefined; } } /** * Serialize JavaScript to a superset of JSON that includes regular expressions and functions. * @param input data to serialize * @param options optional object * @returns serialized data */ declare function serializeJavascript( input: any, options?: serializeJavascript.SerializeJSOptions | number | string, ): string; export = serializeJavascript; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Pochodaydayup](https://github.com/Pochodaydayup), [undefined-moe](https://github.com/undefined-moe), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). serialize-javascript/index.d.ts000644 001751 000177 0000003312 14522451650020600 0ustar00runner000000 000000 1452245165014522451650declare namespace serializeJavascript { interface SerializeJSOptions { /** * This option is the same as the space argument that can be passed to JSON.stringify. * It can be used to add whitespace and indentation to the serialized output to make it more readable. */ space?: string | number | undefined; /** * This option is a signal to serialize() that the object being serialized does not contain any function or regexps values. * This enables a hot-path that allows serialization to be over 3x faster. * If you're serializing a lot of data, and know its pure JSON, then you can enable this option for a speed-up. */ isJSON?: boolean | undefined; /** * This option is to signal serialize() that we want to do a straight conversion, without the XSS protection. * This options needs to be explicitly set to true. HTML characters and JavaScript line terminators will not be escaped. * You will have to roll your own. */ unsafe?: true | undefined; /** * This option is to signal serialize() that we do not want serialize JavaScript function. * Just treat function like JSON.stringify do, but other features will work as expected. */ ignoreFunction?: boolean | undefined; } } /** * Serialize JavaScript to a superset of JSON that includes regular expressions and functions. * @param input data to serialize * @param options optional object * @returns serialized data */ declare function serializeJavascript( input: any, options?: serializeJavascript.SerializeJSOptions | number | string, ): string; export = serializeJavascript; serialize-javascript/package.json000644 001751 000177 0000002233 14522451650021166 0ustar00runner000000 000000 1452246171214522451650{ "name": "@types/serialize-javascript", "version": "5.0.4", "description": "TypeScript definitions for serialize-javascript", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serialize-javascript", "license": "MIT", "contributors": [ { "name": "Pochodaydayup", "githubUsername": "Pochodaydayup", "url": "https://github.com/Pochodaydayup" }, { "name": "undefined-moe", "githubUsername": "undefined-moe", "url": "https://github.com/undefined-moe" }, { "name": "Piotr Błażejewicz", "githubUsername": "peterblazejewicz", "url": "https://github.com/peterblazejewicz" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/serialize-javascript" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "3abaaafcacc0af1fd8b9c36b0b0dc1e01c973040edca90614cd1176a61df38d3", "typeScriptVersion": "4.5" }