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;


Returns `true` if the value is a primitive.

Latest version published 5 years ago

Package Health Score

68 / 100
Full package analysis

Popular is-primitive functions

Popular JavaScript code snippets

Find secure code to use in your application or website