Simple Data Analysis Core - v2.1.14
    Preparing search index...

    Function stringToArray

    • Normalizes a string or array of strings to a new array. Existing arrays are copied so callers can change the result independently.

      Parameters

      • argument: string | string[]

        One string or an array of strings.

      Returns string[]

      A new array containing the supplied strings.

      import { stringToArray } from "@nshiab/simple-data-analysis-core/helpers";
      console.log(stringToArray("name")); // ["name"]
      console.log(stringToArray(["name", "age"])); // ["name", "age"]