{
  "name": "string-width",
  "url": "https://canirequire.com/package/string-width/",
  "description": "Get the visual width of a string - the number of columns required to display it",
  "latest": "8.2.2",
  "latestPublished": "2026-07-08T20:46:47.396Z",
  "format": "esm-only",
  "summary": "string-width@8.2.2 is ESM-only. string-width dropped its CommonJS build in 5.0.0 (April 2021). The last version you can require() on every Node.js version, including 18 and older, is 4.2.3, published Sep 23, 2021. On Node.js 20.19+, 22.12+ and every newer release, require(\"string-width\") works anyway: Node can load synchronous ES modules through require(). Verified on Node 20, 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM. string-width@8.2.2 declares engines \">=20\", so Node.js 18 is outside its supported range regardless of module format.",
  "esmOnlySince": "5.0.0",
  "esmOnlySinceDate": "2021-04-16T07:35:43.206Z",
  "lastCommonJsVersion": "4.2.3",
  "lastCommonJsDate": "2021-09-23T17:17:21.341Z",
  "nativeEsmSince": "5.0.0",
  "types": "bundled",
  "nodeEngines": ">=20",
  "deprecated": null,
  "license": "MIT",
  "repository": "https://github.com/sindresorhus/string-width",
  "weeklyDownloads": 349993800,
  "runtime": {
    "verifiedAt": "2026-09-09T15:27:29.874Z",
    "node": {
      "18": {
        "require": false,
        "import": false,
        "requireError": "ERR_REQUIRE_ESM",
        "importError": "SyntaxError"
      },
      "20": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "22": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "24": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "26": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      }
    },
    "bun": {
      "require": true,
      "import": true,
      "requireError": null,
      "importError": null
    }
  },
  "formatHistory": [
    {
      "version": "8.2.2",
      "format": "esm-only",
      "published": "2026-07-08T20:46:47.396Z"
    },
    {
      "version": "8.2.1",
      "format": "esm-only",
      "published": "2026-04-27T05:27:21.188Z"
    },
    {
      "version": "8.2.0",
      "format": "esm-only",
      "published": "2026-02-18T16:38:40.818Z"
    },
    {
      "version": "8.1.1",
      "format": "esm-only",
      "published": "2026-01-29T03:42:41.370Z"
    },
    {
      "version": "8.1.0",
      "format": "esm-only",
      "published": "2025-09-01T11:47:08.387Z"
    },
    {
      "version": "8.0.0",
      "format": "esm-only",
      "published": "2025-08-22T06:09:04.665Z"
    },
    {
      "version": "7.2.0",
      "format": "esm-only",
      "published": "2024-06-30T14:48:16.656Z"
    },
    {
      "version": "7.1.0",
      "format": "esm-only",
      "published": "2024-01-22T10:48:05.404Z"
    },
    {
      "version": "7.0.0",
      "format": "esm-only",
      "published": "2023-10-28T12:17:10.078Z"
    },
    {
      "version": "6.1.0",
      "format": "esm-only",
      "published": "2023-05-06T19:32:57.382Z"
    },
    {
      "version": "6.0.0",
      "format": "esm-only",
      "published": "2023-05-06T08:39:49.319Z"
    },
    {
      "version": "5.1.2",
      "format": "esm-only",
      "published": "2022-02-28T08:22:05.036Z"
    },
    {
      "version": "5.1.1",
      "format": "esm-only",
      "published": "2022-02-27T09:17:35.378Z"
    },
    {
      "version": "5.1.0",
      "format": "esm-only",
      "published": "2022-01-09T06:04:14.102Z"
    },
    {
      "version": "5.0.1",
      "format": "esm-only",
      "published": "2021-09-13T16:35:04.956Z"
    },
    {
      "version": "5.0.0",
      "format": "esm-only",
      "published": "2021-04-16T07:35:43.206Z"
    },
    {
      "version": "4.2.3",
      "format": "cjs",
      "published": "2021-09-23T17:17:21.341Z"
    },
    {
      "version": "4.2.2",
      "format": "cjs",
      "published": "2021-02-28T14:22:14.935Z"
    },
    {
      "version": "4.2.1",
      "format": "cjs",
      "published": "2021-02-26T09:32:11.791Z"
    },
    {
      "version": "4.2.0",
      "format": "cjs",
      "published": "2019-11-11T16:06:36.863Z"
    },
    {
      "version": "4.1.0",
      "format": "cjs",
      "published": "2019-03-31T12:12:25.885Z"
    },
    {
      "version": "4.0.0",
      "format": "cjs",
      "published": "2019-03-18T08:23:48.708Z"
    },
    {
      "version": "3.1.0",
      "format": "cjs",
      "published": "2019-03-08T08:22:47.824Z"
    },
    {
      "version": "3.0.0",
      "format": "cjs",
      "published": "2018-12-15T14:14:40.848Z"
    },
    {
      "version": "2.1.1",
      "format": "cjs",
      "published": "2017-07-18T11:09:15.295Z"
    },
    {
      "version": "2.1.0",
      "format": "cjs",
      "published": "2017-06-26T16:15:09.531Z"
    },
    {
      "version": "2.0.0",
      "format": "cjs",
      "published": "2016-09-22T06:54:45.828Z"
    },
    {
      "version": "1.0.2",
      "format": "cjs",
      "published": "2016-08-14T15:23:54.869Z"
    },
    {
      "version": "1.0.1",
      "format": "cjs",
      "published": "2015-07-20T01:31:09.758Z"
    },
    {
      "version": "1.0.0",
      "format": "cjs",
      "published": "2015-07-16T22:08:17.757Z"
    }
  ]
}