Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extra-javascript-text

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-javascript-text - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

122

index.d.ts

@@ -5,5 +5,4 @@ /**

* @param full full string
* */
declare type StringMatchFunction = (full: string) => void;
*/
type StringMatchFunction = (full: string) => void;
/**

@@ -14,4 +13,3 @@ * Match string in javascript text.

* @param fn match function
* */
*/
declare function forEachString(txt: string, fn: StringMatchFunction): void;

@@ -23,4 +21,3 @@ /**

* @returns strings
* */
*/
declare function strings(txt: string): string[];

@@ -32,5 +29,4 @@ /**

* @returns updated string
* */
declare type StringReplaceFunction = (full: string) => string;
*/
type StringReplaceFunction = (full: string) => string;
/**

@@ -42,4 +38,3 @@ * Replace strings in javascript text.

* @returns updated javascript text
* */
*/
declare function replaceStrings(txt: string, fn: StringReplaceFunction): string;

@@ -51,4 +46,3 @@ /**

* @returns [updated javascript text, tags]
* */
*/
declare function tagStrings(txt: string): [string, Map<string, string>];

@@ -61,4 +55,3 @@ /**

* @returns updated javascript text
* */
*/
declare function untagStrings(txt: string, tags: Map<string, string>): string;

@@ -69,5 +62,4 @@ /**

* @param full full comment
* */
declare type CommentMatchFunction = (full: string) => void;
*/
type CommentMatchFunction = (full: string) => void;
/**

@@ -78,4 +70,3 @@ * Match links in javascript text.

* @param fn match function
* */
*/
declare function forEachComment(txt: string, fn: CommentMatchFunction): void;

@@ -87,4 +78,3 @@ /**

* @returns comments
* */
*/
declare function comments(txt: string): string[];

@@ -96,5 +86,4 @@ /**

* @returns updated comment
* */
declare type CommentReplaceFunction = (full: string) => string;
*/
type CommentReplaceFunction = (full: string) => string;
/**

@@ -106,4 +95,3 @@ * Replace comments in javascript text.

* @returns updated javascript text
* */
*/
declare function replaceComments(txt: string, fn: CommentReplaceFunction): string;

@@ -115,4 +103,3 @@ /**

* @returns [updated javascript text, tags]
* */
*/
declare function tagComments(txt: string): [string, Map<string, string>];

@@ -125,4 +112,3 @@ /**

* @returns updated javascript text
* */
*/
declare function untagComments(txt: string, tags: Map<string, string>): string;

@@ -132,4 +118,3 @@ /**

* [📘](https://github.com/nodef/extra-javascript-text/wiki/uncomment)
* */
*/
declare function uncomment(txt: string, empty?: boolean): string;

@@ -145,5 +130,4 @@ /**

* @param isDefault symbol is default?
* */
declare type JsdocSymbolMatchFunction = (full: string, jsdoc: string, name: string, kind: string, isExported: boolean, isDefault: boolean) => void;
*/
type JsdocSymbolMatchFunction = (full: string, jsdoc: string, name: string, kind: string, isExported: boolean, isDefault: boolean) => void;
/**

@@ -154,4 +138,3 @@ * Match jsdoc symbols in javascript text.

* @param fn match function
* */
*/
declare function forEachJsdocSymbol(txt: string, fn: JsdocSymbolMatchFunction): void;

@@ -161,4 +144,3 @@ /**

* [📘](https://github.com/nodef/extra-javascript-text/wiki/JsdocSymbol)
* */
*/
interface JsdocSymbol {

@@ -183,4 +165,3 @@ /** Full jsdoc symbol match. */

* @returns jsdoc symbols
* */
*/
declare function jsdocSymbols(txt: string): JsdocSymbol[];

@@ -197,5 +178,4 @@ /**

* @returns updated jsdoc symbol
* */
declare type JsdocSymbolReplaceFunction = (full: string, jsdoc: string, name: string, kind: string, isExported: boolean, isDefault: boolean) => string;
*/
type JsdocSymbolReplaceFunction = (full: string, jsdoc: string, name: string, kind: string, isExported: boolean, isDefault: boolean) => string;
/**

@@ -207,4 +187,3 @@ * Replace jsdoc symbols in javascript text.

* @returns updated javascript text
* */
*/
declare function replaceJsdocSymbols(txt: string, fn: JsdocSymbolReplaceFunction): string;

@@ -218,5 +197,4 @@ /**

* @param isDefault symbol is default?
* */
declare type ExportSymbolMatchFunction = (full: string, name: string, kind: string, isDefault: boolean) => void;
*/
type ExportSymbolMatchFunction = (full: string, name: string, kind: string, isDefault: boolean) => void;
/**

@@ -227,4 +205,3 @@ * Match export symbols in javascript text.

* @param fn match function
* */
*/
declare function forEachExportSymbol(txt: string, fn: ExportSymbolMatchFunction): void;

@@ -234,4 +211,3 @@ /**

* [📘](https://github.com/nodef/extra-javascript-text/wiki/ExportSymbol)
* */
*/
interface ExportSymbol {

@@ -252,4 +228,3 @@ /** Full export symbol match. */

* @returns export symbols
* */
*/
declare function exportSymbols(txt: string): ExportSymbol[];

@@ -264,5 +239,4 @@ /**

* @returns updated export symbol
* */
declare type ExportSymbolReplaceFunction = (full: string, name: string, kind: string, isDefault: boolean) => string;
*/
type ExportSymbolReplaceFunction = (full: string, name: string, kind: string, isDefault: boolean) => string;
/**

@@ -274,4 +248,3 @@ * Replace export symbols in javascript text.

* @returns updated javascript text
* */
*/
declare function replaceExportSymbols(txt: string, fn: ExportSymbolReplaceFunction): string;

@@ -283,5 +256,4 @@ /**

* @param file import file
* */
declare type ImportSymbolMatchFunction = (full: string, file: string) => void;
*/
type ImportSymbolMatchFunction = (full: string, file: string) => void;
/**

@@ -292,4 +264,3 @@ * Match import symbols in javascript text.

* @param fn match function
* */
*/
declare function forEachImportSymbol(txt: string, fn: ImportSymbolMatchFunction): void;

@@ -299,4 +270,3 @@ /**

* [📘](https://github.com/nodef/extra-javascript-text/wiki/ImportSymbol)
* */
*/
interface ImportSymbol {

@@ -313,4 +283,3 @@ /** Full import symbol match. */

* @returns export symbols
* */
*/
declare function importSymbols(txt: string): ImportSymbol[];

@@ -323,5 +292,4 @@ /**

* @returns updated import symbol
* */
declare type ImportSymbolReplaceFunction = (full: string, file: string) => string;
*/
type ImportSymbolReplaceFunction = (full: string, file: string) => string;
/**

@@ -333,4 +301,3 @@ * Replace import symbols in javascript text.

* @returns updated javascript text
* */
*/
declare function replaceImportSymbols(txt: string, fn: ImportSymbolReplaceFunction): string;

@@ -343,6 +310,5 @@ /**

* @returns corrected javascript text
* */
*/
declare function correctDeclarations(txt: string, module?: string): string;
export { CommentMatchFunction, CommentReplaceFunction, ExportSymbol, ExportSymbolMatchFunction, ExportSymbolReplaceFunction, ImportSymbol, ImportSymbolMatchFunction, ImportSymbolReplaceFunction, JsdocSymbol, JsdocSymbolMatchFunction, JsdocSymbolReplaceFunction, StringMatchFunction, StringReplaceFunction, comments, correctDeclarations, exportSymbols, forEachComment, forEachExportSymbol, forEachImportSymbol, forEachJsdocSymbol, forEachString, importSymbols, jsdocSymbols, replaceComments, replaceExportSymbols, replaceImportSymbols, replaceJsdocSymbols, replaceStrings, strings, tagComments, tagStrings, uncomment, untagComments, untagStrings };
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function indexOfClosingString(txt, i) {

@@ -6,0 +4,0 @@ var q = txt.charAt(i);

{
"name": "extra-javascript-text",
"version": "0.1.12",
"version": "0.1.13",
"description": "Utilities for processing JavaScript text.",

@@ -68,9 +68,9 @@ "main": "index.js",

"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@types/node": "^18.6.2",
"extra-build": "^2.2.21",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/node": "^18.11.18",
"extra-build": "^2.2.40",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^4.2.2"
"rollup-plugin-dts": "^5.1.1"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc