Skip to content

Reason for using node-gyp? #103

Closed
Closed
@webketje

Description

@webketje

Hi there,

Is there any reason why the module defaults to validation.c (compiled with node-gyp postinstall)
AFAICS the "fallback" contains the same "main" code and no important native API's are used.
Is it purely for efficiency with large files?

Context: looking for replacement for https://github.com/wayfind/is-utf8 for Metalsmith SSG, due to erroneous handling of ASCII chars, see wayfind/is-utf8#6 but cannot consider any lib that requires node-gyp (due to platform-specific issues)

So this request would be to justify node-gyp dependency overhead in the docs and/ or make it an optionalDependency (as require('utf8-validate/fallback') should also work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions