MCPcopy Create free account
hub / github.com/developit/microbundle / isTruthy

Function isTruthy

src/utils.js:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22export const stderr = console.error.bind(console);
23
24export const isTruthy = obj => {
25 if (!obj) {
26 return false;
27 }
28
29 return obj.constructor !== Object || Object.keys(obj).length > 0;
30};
31
32/** Remove a @scope/ prefix from a package name string */
33export const removeScope = name => name.replace(/^@.*\//, '');

Callers 2

createConfigFunction · 0.90
configFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…