Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Standardizing OnigScanner's second parameter #81

@zikaari

Description

@zikaari

I maintain WebAssembly port of oniguruma called onigasm which is, and preferably should remain, 1:1 API compatible with node-oniguruma.

Certain circumstances now require OnigScanner's ability to use regex syntaxes/flavours other than default oniguruma syntax.

Now, of course that change doesn't need to be part of node-oniguruma right now, but if only node-oniguruma and onigasm could sync up on the new spec that'd be super cool.

Current API as of oniguruma@7.0.0

OnigScanner(patterns: string[])
OnigRegExp(pattern: string)

Proposed API (whenever `node-oniguruma decides to get on board)

type OnigOptions = {
    syntax: 'perl' | 'java' | 'ruby' | 'grep' | 'posix'
}

OnigScanner(patterns: string[], options?: OnigOptions)
OnigRegExp(pattern: string, options?: OnigOptions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions