How to use the detect-libc.MUSL function in detect-libc

To help you get started, we’ve selected a few detect-libc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lovell / sharp / test / unit / beforeEach.js View on Github external
'use strict';

const detectLibc = require('detect-libc');
const sharp = require('../../');

const usingCache = detectLibc.family !== detectLibc.MUSL;
const usingSimd = !process.env.G_DEBUG;
const concurrency = detectLibc.family === detectLibc.MUSL ? 1 : undefined;

beforeEach(function () {
  sharp.cache(usingCache);
  sharp.simd(usingSimd);
  sharp.concurrency(concurrency);
});

afterEach(function () {
  if (global.gc) {
    global.gc();
  }
});
github lovell / sharp / test / unit / beforeEach.js View on Github external
'use strict';

const detectLibc = require('detect-libc');
const sharp = require('../../');

const usingCache = detectLibc.family !== detectLibc.MUSL;
const usingSimd = !process.env.G_DEBUG;
const concurrency = detectLibc.family === detectLibc.MUSL ? 1 : undefined;

beforeEach(function () {
  sharp.cache(usingCache);
  sharp.simd(usingSimd);
  sharp.concurrency(concurrency);
});

afterEach(function () {
  if (global.gc) {
    global.gc();
  }
});

detect-libc

Node.js module to detect the C standard library (libc) implementation family and version

Apache-2.0
Latest version published 2 months ago

Package Health Score

80 / 100
Full package analysis