On this page

    P

    ffi.suffix

    History
    Attributes

    The native shared library suffix for the current platform:

    • 'dylib' on macOS
    • 'so' on Unix-like platforms
    • 'dll' on Windows

    This can be used to build portable library paths:

    const { suffix } = require('node:ffi');
    
    const path = `libsqlite3.${suffix}`;