Socket
Socket
Sign inDemoInstall

weapon-regex

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weapon-regex - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

110

index.d.ts
export interface Location {
start: Position;
end: Position;
start: Position;
end: Position;
get show(): string;
}
export interface Position {
line: number;
column: number;
line: number;
column: number;
}

@@ -13,7 +15,7 @@

declare class ParserFlavorJSClass {
private __marker: 'js';
private __marker: 'js';
}
declare class ParserFlavorJVMClass {
private __marker: 'jvm';
private __marker: 'jvm';
}

@@ -27,32 +29,36 @@

export interface TokenMutator {
name: string;
levels: number[];
name: string;
levels: number[];
}
export interface MutationOptions {
mutators?: TokenMutator[];
mutationLevels?: number[];
flavor?: ParserFlavor;
mutators?: TokenMutator[];
mutationLevels?: number[];
flavor?: ParserFlavor;
}
export interface Mutant {
/** The replacement pattern
*/
pattern: string;
/** The replacement pattern
*/
pattern: string;
/** Name of the mutation
*/
name: string;
/** Name of the mutation
*/
name: string;
/** [[weaponregex.model.Location]] in the original string where the mutation occurred
*/
location: Location;
/** [[weaponregex.model.Location]] in the original string where the mutation occurred
*/
location: Location;
/** The mutation levels of the mutator
*/
levels: number[];
/** The mutation levels of the mutator
*/
levels: number[];
/** Description on the mutation
*/
description: string;
/** Description on the mutation
*/
description: string;
/** The part of the pattern that has been changed
*/
replacement: string;
}

@@ -78,3 +84,7 @@

*/
export function mutate(pattern: string, flags?: string, options?: MutationOptions): Mutant[];
export function mutate(
pattern: string,
flags?: string | null,
options?: MutationOptions | null
): Mutant[];

@@ -86,29 +96,29 @@ /** JS Map that maps from a token mutator class names to the associating token mutator

export const BuiltinMutators: {
/** JS Array of all built-in token mutators
*/
all: TokenMutator[];
/** JS Array of all built-in token mutators
*/
all: TokenMutator[];
/** JS Map that maps from a token mutator class names to the associating token mutator
*/
byName: Map<string, TokenMutator>;
/** JS Map that maps from a token mutator class names to the associating token mutator
*/
byName: Map<string, TokenMutator>;
/** JS Map that maps from mutation level number to token mutators in that level
*/
byLevel: Map<number, TokenMutator[]>;
/** JS Map that maps from mutation level number to token mutators in that level
*/
byLevel: Map<number, TokenMutator[]>;
/** Get all the token mutators in the given mutation level
* @param mutationLevel
* Mutation level number
* @return
* Array of all the tokens mutators in that level, if any
*/
atLevel(mutationLevel: number): TokenMutator[];
/** Get all the token mutators in the given mutation level
* @param mutationLevel
* Mutation level number
* @return
* Array of all the tokens mutators in that level, if any
*/
atLevel(mutationLevel: number): TokenMutator[];
/** Get all the token mutators in the given mutation levels
* @param mutationLevels
* Mutation level numbers
* @return
* Array of all the tokens mutators in that levels, if any
*/
atLevels(mutationLevels: number[]): TokenMutator[];
/** Get all the token mutators in the given mutation levels
* @param mutationLevels
* Mutation level numbers
* @return
* Array of all the tokens mutators in that levels, if any
*/
atLevels(mutationLevels: number[]): TokenMutator[];
};
{
"name": "weapon-regex",
"type": "module",
"version": "1.2.1",
"version": "1.3.0",
"description": "Weapon regeX mutates regular expressions for use in mutation testing.",

@@ -6,0 +6,0 @@ "exports": {

Sorry, the diff of this file is too big to display

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