How to use is-primitive - 1 common examples

To help you get started, we’ve selected a few is-primitive 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 OfficeDev / script-lab / packages / common / src / utilities / string / index.ts View on Github external
function isEachObjectAPrimitiveType(objects: any[]): boolean {
    for (let i = 0; i < objects.length; i++) {
      if (!isPrimitive(objects[i])) {
        return false;
      }
    }

    return true;
  }
}

is-primitive

Returns `true` if the value is a primitive.

MIT
Latest version published 6 years ago

Package Health Score

68 / 100
Full package analysis

Popular is-primitive functions