caseparser 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -60
- package/dist/index.cjs +195 -1749
- package/dist/index.d.cts +30 -1331
- package/dist/index.d.ts +30 -1331
- package/dist/index.js +196 -1660
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/caseparser)
|
|
4
4
|
[](https://jsr.io/@nandomb/caseparser)
|
|
5
5
|
[](https://jsr.io/@nandomb/caseparser)
|
|
6
|
+
[](https://socket.dev/npm/package/caseparser)
|
|
6
7
|
[](https://github.com/NandoMB/caseparser/actions/workflows/main.yml)
|
|
7
8
|
[](https://www.npmjs.com/package/caseparser)
|
|
8
9
|
[](./LICENSE)
|
|
@@ -22,12 +23,12 @@ Convert **strings** and **object keys** to any case, **whatever case they are in
|
|
|
22
23
|
- [Installation](#installation)
|
|
23
24
|
- [Quick start](#quick-start)
|
|
24
25
|
- [Cases](#cases)
|
|
25
|
-
- [Options](#options): [`allowSymbols`](#allowsymbols), [`transform`](#transform), [`separator`](#separator)
|
|
26
|
+
- [Options](#options): [`allowSymbols`](#allowsymbols), [`ignore`](#ignore), [`transform`](#transform), [`separator`](#separator)
|
|
26
27
|
- [Type inference](#type-inference)
|
|
27
28
|
- [How keys are split into words](#how-keys-are-split-into-words)
|
|
28
29
|
- [Behavior and limitations](#behavior-and-limitations)
|
|
30
|
+
- [Benchmarks](#benchmarks)
|
|
29
31
|
- [Compatibility](#compatibility)
|
|
30
|
-
- [Deprecated `<from>To<To>` functions](#deprecated-fromtoto-functions)
|
|
31
32
|
- [Security](#security)
|
|
32
33
|
|
|
33
34
|
## Installation
|
|
@@ -153,6 +154,17 @@ toCamel(data, ['$']); // same as { allowSymbols: ['$'] }
|
|
|
153
154
|
|
|
154
155
|
A kept symbol sticks to the start of the next word: `toPascal('$id', true)` → `'$Id'`. See [How keys are split into words](#how-keys-are-split-into-words) for the details.
|
|
155
156
|
|
|
157
|
+
### `ignore`
|
|
158
|
+
|
|
159
|
+
Object keys that are kept as they are, at any depth. Their values are still converted:
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
toCamel({ _id: 1, user_id: 2, extra_data: { inner_key: 3 } }, { ignore: ['_id', 'extra_data'] });
|
|
163
|
+
// { _id: 1, userId: 2, extra_data: { innerKey: 3 } }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Keys are matched exactly as they are in the input. The inferred type keeps the ignored keys too. It only applies to object keys: `toSnake('userId', { ignore: ['userId'] })` still returns `'user_id'`.
|
|
167
|
+
|
|
156
168
|
### `transform`
|
|
157
169
|
|
|
158
170
|
Only for `toDot` and `toPath`, which keep the original case of each word by default. `'lowercase'` or `'uppercase'` changes the case of the whole result, object keys included:
|
|
@@ -222,78 +234,115 @@ The inferred types follow the same rules.
|
|
|
222
234
|
## Behavior and limitations
|
|
223
235
|
|
|
224
236
|
- **Only keys are converted, never values.** In `{ userName: 'johnDoe' }`, `userName` becomes `user_name` but `'johnDoe'` is kept. Strings inside arrays are kept too.
|
|
225
|
-
- **Only plain objects are traversed.** `Date`, `Map`, `Set
|
|
237
|
+
- **Only plain objects are traversed.** `Date`, `Map`, `Set`, class instances and objects without a prototype (`Object.create(null)`) are returned as they are (same reference), without converting their contents.
|
|
226
238
|
- **Acronyms are kept together, but not restored:** `toSnake('userID')` → `'user_id'`, and back `toCamel('user_id')` → `'userId'`.
|
|
227
239
|
- **Words are lowercased** before converting (except by `toDot`, `toPath` and `toSpace`), so `toCamel('X-API-Key')` → `'xApiKey'` and `toCamel('First Name')` → `'firstName'`.
|
|
228
240
|
- **Title Case capitalizes every word**, including short ones: `toTitle('termsOfUse')` → `'Terms Of Use'`.
|
|
241
|
+
- **Very deep or circular objects throw.** Objects are converted recursively, so an object nested thousands of levels deep (~5,000 with the default stack of Node.js), or one that contains itself, throws `RangeError: Maximum call stack size exceeded`. `JSON.parse` accepts that depth, so limit it if the input is untrusted and the error is not handled.
|
|
229
242
|
- **Type inference has a key length limit.** TypeScript limits how deeply a type can recurse, and keys are converted character by character at the type level. Keys are inferred up to ~120 characters; longer keys fail to compile with `Type instantiation is excessively deep and possibly infinite`. The runtime conversion has no limit.
|
|
230
243
|
|
|
244
|
+
### Design trade-offs
|
|
245
|
+
|
|
246
|
+
- **Nothing is kept between calls.** Within a call, each distinct key is converted once, so the 100 items of an API response cost about as much as one. That work is dropped when the call returns. A library that keeps converted keys between calls (camelcase-keys keeps up to 2 × 100,000) is faster when the same small object is converted over and over, but it holds that memory for the life of the process. With untrusted input (keys chosen by whoever sends the request), that cache can also fill up with keys that never come back and push out the useful ones. caseparser keeps no memory and no state between calls (see [memory](./bench/results/memory.md)).
|
|
247
|
+
- **The cache is only created for arrays.** The objects in an array usually share their keys, while the keys of a single object don't repeat, so small objects and objects with unique keys don't pay for it. Keys repeated in nested objects outside arrays are converted again.
|
|
248
|
+
- **A few hundred bytes more for the same two functions.** Bundling only `toCamel` and `toSnake` takes 1.5 KB gzipped (0.8 KB in 5.1.0), for the character tables and the key cache that make them faster. The whole package is smaller than before (1.8 KB gzipped, 3.1 KB in 5.1.0), because 6.0 removed the deprecated functions.
|
|
249
|
+
- **Correct before fast.** Every `toX` function splits words the same way (acronyms, digits, symbols, non-ASCII letters), even when a simpler rule would be faster for plain `snake_case` → `camelCase` keys.
|
|
250
|
+
|
|
251
|
+
## Benchmarks
|
|
252
|
+
|
|
253
|
+
Median time to convert the same data to each case on Node.js 24 (Apple M3 Pro); lower is faster. Each library was measured in 3 rounds, in a different order each time, and the time is the mean of the 3 medians. In **bold**: the fastest, and any library tied with it (its results in the 3 rounds overlap with the fastest's). ❌: the library doesn't convert keys to that case.
|
|
254
|
+
|
|
255
|
+
#### Repeated keys: an API response with 100 users (2,104 keys)
|
|
256
|
+
|
|
257
|
+
Every user has the same keys, like the items of a real API response.
|
|
258
|
+
|
|
259
|
+
| Case | caseparser | caseparser@5.1.0 | change-case | camelcase-keys | snakecase-keys | humps | es-toolkit |
|
|
260
|
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
261
|
+
| camelCase | **59 µs** | 979 µs | 969 µs | 271 µs | ❌ | 546 µs | 392 µs |
|
|
262
|
+
| PascalCase | **59 µs** | 1.06 ms | 1.03 ms | 364 µs | ❌ | 637 µs | 506 µs |
|
|
263
|
+
| snake_case | **57 µs** | 891 µs | 1.07 ms | ❌ | 1.38 ms | 400 µs | 380 µs |
|
|
264
|
+
| kebab-case | **58 µs** | 916 µs | 1.09 ms | ❌ | 1.41 ms | 404 µs | 385 µs |
|
|
265
|
+
| UPPER_SNAKE | **58 µs** | 950 µs | 1.13 ms | ❌ | ❌ | ❌ | 455 µs |
|
|
266
|
+
| UPPER-KEBAB | **58 µs** | 947 µs | 1.15 ms | ❌ | ❌ | ❌ | ❌ |
|
|
267
|
+
| Train-Case | **58 µs** | 1.10 ms | 1.19 ms | ❌ | ❌ | ❌ | ❌ |
|
|
268
|
+
| Title Case | **58 µs** | 1.11 ms | 1.16 ms | ❌ | ❌ | ❌ | ❌ |
|
|
269
|
+
| Sentence case | **58 µs** | 1.02 ms | 1.15 ms | ❌ | ❌ | ❌ | ❌ |
|
|
270
|
+
| Pascal_Snake | **58 µs** | 1.10 ms | 1.17 ms | ❌ | ❌ | ❌ | ❌ |
|
|
271
|
+
| lower case | **57 µs** | 893 µs | 1.08 ms | ❌ | 1.40 ms | 401 µs | ❌ |
|
|
272
|
+
| UPPER CASE | **58 µs** | 962 µs | 1.15 ms | ❌ | ❌ | ❌ | ❌ |
|
|
273
|
+
| dot.case | **57 µs** | 903 µs | 1.07 ms | ❌ | 1.40 ms | 404 µs | ❌ |
|
|
274
|
+
| path/case | **57 µs** | 971 µs | 1.08 ms | ❌ | 1.41 ms | 406 µs | ❌ |
|
|
275
|
+
|
|
276
|
+
#### Unique keys: an object with 1,000 keys
|
|
277
|
+
|
|
278
|
+
No key repeats, in the object or between calls, so this measures how fast each key is converted.
|
|
279
|
+
|
|
280
|
+
| Case | caseparser | caseparser@5.1.0 | change-case | camelcase-keys | snakecase-keys | humps | es-toolkit |
|
|
281
|
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
282
|
+
| camelCase | **379 µs** | 1.46 ms | 796 µs | 1.11 ms | ❌ | 576 µs | 464 µs |
|
|
283
|
+
| PascalCase | **415 µs** | 2.08 ms | 888 µs | 1.35 ms | ❌ | 648 µs | **516 µs** |
|
|
284
|
+
| snake_case | **390 µs** | 1.32 ms | 849 µs | ❌ | 921 µs | **444 µs** | **404 µs** |
|
|
285
|
+
| kebab-case | **381 µs** | 1.98 ms | 909 µs | ❌ | 1.00 ms | 519 µs | **475 µs** |
|
|
286
|
+
| UPPER_SNAKE | **439 µs** | 2.01 ms | 956 µs | ❌ | ❌ | ❌ | **497 µs** |
|
|
287
|
+
| UPPER-KEBAB | **502 µs** | 1.42 ms | 987 µs | ❌ | ❌ | ❌ | ❌ |
|
|
288
|
+
| Train-Case | **448 µs** | 1.54 ms | 1.00 ms | ❌ | ❌ | ❌ | ❌ |
|
|
289
|
+
| Title Case | **416 µs** | 1.53 ms | 995 µs | ❌ | ❌ | ❌ | ❌ |
|
|
290
|
+
| Sentence case | **429 µs** | 2.08 ms | 926 µs | ❌ | ❌ | ❌ | ❌ |
|
|
291
|
+
| Pascal_Snake | **438 µs** | 991 µs | 1.00 ms | ❌ | ❌ | ❌ | ❌ |
|
|
292
|
+
| lower case | **441 µs** | 1.47 ms | 949 µs | ❌ | 995 µs | **509 µs** | ❌ |
|
|
293
|
+
| UPPER CASE | **460 µs** | 1.49 ms | 987 µs | ❌ | ❌ | ❌ | ❌ |
|
|
294
|
+
| dot.case | **442 µs** | 854 µs | 961 µs | ❌ | 1.00 ms | **515 µs** | ❌ |
|
|
295
|
+
| path/case | **475 µs** | 1.42 ms | 973 µs | ❌ | 1.01 ms | **521 µs** | ❌ |
|
|
296
|
+
|
|
297
|
+
With repeated keys, caseparser is 5–25x faster than the others, because it converts each distinct key once per call. With unique keys every library converts every key, and caseparser is the fastest or tied: this scenario creates a lot of garbage, so the results change up to ~20% between rounds for every library. For a small object (8 keys) converted over and over, camelcase-keys is faster to camelCase (0.75 µs, against 0.96 µs), because it keeps converted keys between calls (see [Design trade-offs](#design-trade-offs)); to snake_case, caseparser is the fastest (0.92 µs). For strings, caseparser is the fastest too (1.1 µs for 10 strings, against 1.4 µs for es-toolkit).
|
|
298
|
+
|
|
299
|
+
#### Memory
|
|
300
|
+
|
|
301
|
+
Heap used on Node.js, measured in a new process for each library:
|
|
302
|
+
|
|
303
|
+
| Library | Loading the library | One call: API response | One call: 1,000 unique keys | Kept after converting 256,000 keys |
|
|
304
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
305
|
+
| caseparser | 70 KB | **121 KB** | **516 KB** | 0 |
|
|
306
|
+
| caseparser@5.1.0 | 289 KB | 2,348 KB | 2,719 KB | 0 |
|
|
307
|
+
| change-case | 136 KB | 2,850 KB | 1,610 KB | 0 |
|
|
308
|
+
| camelcase-keys | 209 KB | 1,516 KB | 1,742 KB | 11,483 KB |
|
|
309
|
+
| humps | **62 KB** | 1,183 KB | 759 KB | 0 |
|
|
310
|
+
| es-toolkit | 622 KB | 1,745 KB | 1,062 KB | 0 |
|
|
311
|
+
|
|
312
|
+
Loading is the heap used by importing the library, as the benchmarks do. One call is the memory allocated to convert to camelCase, including the result (62 KB and 48 KB). "Kept" is the memory still used after the calls: camelcase-keys keeps the keys it converted between calls (up to 2 × 100,000). 0 means under 10 KB, which is the noise of the measurement.
|
|
313
|
+
|
|
314
|
+
#### Compared with the same libraries
|
|
315
|
+
|
|
316
|
+
- **Cases:** caseparser and change-case convert keys to all 14 cases; humps to 7, es-toolkit and snakecase-keys to 5, camelcase-keys to 2.
|
|
317
|
+
- **Mixed input:** keys in different cases in one object are converted by all of them except humps.
|
|
318
|
+
- **Values:** caseparser and es-toolkit keep `Date`, `Map` and class instances as they are. The others turn some of them into broken copies or plain objects.
|
|
319
|
+
- **Types:** the converted keys are typed by caseparser, camelcase-keys and snakecase-keys. es-toolkit types some keys differently from its result, humps types the result as `object`, and change-case as `unknown`.
|
|
320
|
+
- **Security:** with `__proto__` in untrusted JSON, `humps.decamelizeKeys` replaces the result's prototype, and with a `constructor` key, snakecase-keys throws. The others, caseparser included, convert both.
|
|
321
|
+
- **Skipping keys:** caseparser (`ignore`), camelcase-keys, snakecase-keys and humps have an option to keep some keys as they are; change-case and es-toolkit don't.
|
|
322
|
+
- **Edge cases:** the libraries return different results, for example `userID` → `user_id` or `user_i_d`, and `html5Parser` → `html5_parser` or `html_5_parser`. See [what each library returns](./bench/results/edge-cases.md).
|
|
323
|
+
|
|
324
|
+
The benchmarks check that every library returns the expected output before measuring it, and each library is called in [its own file](./bench/libraries), with its documented options. The method and every result, with the raw numbers of every round, the date and the versions, are in [`bench/`](./bench). To run them all:
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
pnpm install
|
|
328
|
+
pnpm benchmark
|
|
329
|
+
```
|
|
330
|
+
|
|
231
331
|
## Compatibility
|
|
232
332
|
|
|
233
333
|
| Environment | Supported |
|
|
234
334
|
| --- | --- |
|
|
235
|
-
| ESM (`import`) | Node.js
|
|
236
|
-
| CommonJS (`require`) | Node.js
|
|
237
|
-
| TypeScript | 4.
|
|
335
|
+
| ESM (`import`) | Node.js 22+, Deno, Bun, bundlers |
|
|
336
|
+
| CommonJS (`require`) | Node.js 22+, Bun |
|
|
337
|
+
| TypeScript | 4.7+ (any `moduleResolution`: `node`, `node16`/`nodenext`, `bundler`) |
|
|
238
338
|
| Browsers | Any ES2015 browser (via bundler) |
|
|
239
|
-
| Edge | Cloudflare Workers |
|
|
240
|
-
|
|
241
|
-
On every change, CI runs the test suite on Node.js 22, 24 and 26, Bun and Deno, and in Chromium, Firefox and WebKit. It also checks the packed package with [publint](https://publint.dev) and [Are the Types Wrong?](https://arethetypeswrong.github.io), for ESM, CommonJS and every `moduleResolution`, and compiles the type declarations with TypeScript 4.1.
|
|
339
|
+
| Edge | Cloudflare Workers ([example](./examples/cloudflare-worker)) |
|
|
242
340
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
> **Deprecated:** the `<from>To<To>` functions (e.g. `snakeToCamel`) are deprecated in favor of the `toX` functions and will be removed in the next major version, which will also require TypeScript 4.7+. They keep working until then.
|
|
246
|
-
|
|
247
|
-
### Migrating to `toX`
|
|
248
|
-
|
|
249
|
-
Replace each `<from>To<To>` function with the `toX` function for its target case, whatever the source case: `camelToSnake`, `dashToSnake`, `titleToSnake`... all become `toSnake`. The dash cases were renamed: `<from>ToDash` becomes `toKebab`, and `<from>ToUpperDash` becomes `toUpperKebab`.
|
|
250
|
-
|
|
251
|
-
For well-formed keys (`firstName`, `first_name`) the result is the same. It differs when a key has consecutive uppercase letters or doesn't match the source case, and `toDot` keeps the original case of each word (pass `{ transform: 'lowercase' }` to get the old result):
|
|
252
|
-
|
|
253
|
-
| Call | `<from>To<To>` result | `toX` result |
|
|
254
|
-
| --- | --- | --- |
|
|
255
|
-
| `camelToSnake('userID')` / `toSnake('userID')` | `'user_i_d'` | `'user_id'` |
|
|
256
|
-
| `camelToSnake('XMLHttpRequest')` / `toSnake('XMLHttpRequest')` | `'_x_m_l_http_request'` | `'xml_http_request'` |
|
|
257
|
-
| `camelToSnake('HelloWorld')` / `toSnake('HelloWorld')` | `'_hello_world'` | `'hello_world'` |
|
|
258
|
-
| `snakeToCamel('user_ID')` / `toCamel('user_ID')` | `'userID'` | `'userId'` |
|
|
259
|
-
| `camelToDot('helloWorld')` / `toDot('helloWorld')` | `'hello.world'` | `'hello.World'` |
|
|
260
|
-
|
|
261
|
-
If your code reads keys like `user_i_d` produced by the old functions, update those reads when migrating. The inferred types follow the new results, so TypeScript points out every place to change.
|
|
262
|
-
|
|
263
|
-
<details>
|
|
264
|
-
<summary>All 90 deprecated functions</summary>
|
|
265
|
-
|
|
266
|
-
Every function is named `<from>To<To>`, e.g. `snakeToCamel`. The case names are:
|
|
267
|
-
|
|
268
|
-
| Name | Example |
|
|
269
|
-
| --- | --- |
|
|
270
|
-
| `camel` | `helloWorld` |
|
|
271
|
-
| `pascal` | `HelloWorld` |
|
|
272
|
-
| `snake` | `hello_world` |
|
|
273
|
-
| `dash` | `hello-world` |
|
|
274
|
-
| `upperSnake` | `HELLO_WORLD` |
|
|
275
|
-
| `upperDash` | `HELLO-WORLD` |
|
|
276
|
-
| `train` | `Hello-World` |
|
|
277
|
-
| `dot` | `hello.world` |
|
|
278
|
-
| `title` | `Hello World` |
|
|
279
|
-
| `sentence` | `Hello world` |
|
|
280
|
-
|
|
281
|
-
- **camelCase:** `camelToPascal`, `camelToSnake`, `camelToDash`, `camelToUpperSnake`, `camelToUpperDash`, `camelToTrain`, `camelToDot`, `camelToTitle`, `camelToSentence`
|
|
282
|
-
- **PascalCase:** `pascalToCamel`, `pascalToSnake`, `pascalToDash`, `pascalToUpperSnake`, `pascalToUpperDash`, `pascalToTrain`, `pascalToDot`, `pascalToTitle`, `pascalToSentence`
|
|
283
|
-
- **snake_case:** `snakeToCamel`, `snakeToPascal`, `snakeToDash`, `snakeToUpperSnake`, `snakeToUpperDash`, `snakeToTrain`, `snakeToDot`, `snakeToTitle`, `snakeToSentence`
|
|
284
|
-
- **dash-case:** `dashToCamel`, `dashToPascal`, `dashToSnake`, `dashToUpperSnake`, `dashToUpperDash`, `dashToTrain`, `dashToDot`, `dashToTitle`, `dashToSentence`
|
|
285
|
-
- **UPPER_SNAKE_CASE:** `upperSnakeToCamel`, `upperSnakeToPascal`, `upperSnakeToSnake`, `upperSnakeToDash`, `upperSnakeToUpperDash`, `upperSnakeToTrain`, `upperSnakeToDot`, `upperSnakeToTitle`, `upperSnakeToSentence`
|
|
286
|
-
- **UPPER-DASH-CASE:** `upperDashToCamel`, `upperDashToPascal`, `upperDashToSnake`, `upperDashToDash`, `upperDashToUpperSnake`, `upperDashToTrain`, `upperDashToDot`, `upperDashToTitle`, `upperDashToSentence`
|
|
287
|
-
- **Train-Case:** `trainToCamel`, `trainToPascal`, `trainToSnake`, `trainToDash`, `trainToUpperSnake`, `trainToUpperDash`, `trainToDot`, `trainToTitle`, `trainToSentence`
|
|
288
|
-
- **dot.case:** `dotToCamel`, `dotToPascal`, `dotToSnake`, `dotToDash`, `dotToUpperSnake`, `dotToUpperDash`, `dotToTrain`, `dotToTitle`, `dotToSentence`
|
|
289
|
-
- **Title Case:** `titleToCamel`, `titleToPascal`, `titleToSnake`, `titleToDash`, `titleToUpperSnake`, `titleToUpperDash`, `titleToTrain`, `titleToDot`, `titleToSentence`
|
|
290
|
-
- **Sentence case:** `sentenceToCamel`, `sentenceToPascal`, `sentenceToSnake`, `sentenceToDash`, `sentenceToUpperSnake`, `sentenceToUpperDash`, `sentenceToTrain`, `sentenceToDot`, `sentenceToTitle`
|
|
291
|
-
|
|
292
|
-
</details>
|
|
341
|
+
On every change, CI runs the test suite on Node.js 22, 24 and 26, Bun and Deno, and in Chromium, Firefox and WebKit, and runs [a Cloudflare Worker](./examples/cloudflare-worker) on workerd with the packed package. It also checks the packed package with [publint](https://publint.dev) and [Are the Types Wrong?](https://arethetypeswrong.github.io), for ESM, CommonJS and every `moduleResolution`, and compiles the type declarations with TypeScript 4.7.
|
|
293
342
|
|
|
294
343
|
## Security
|
|
295
344
|
|
|
296
|
-
caseparser is safe to use with untrusted input (e.g. request bodies or `JSON.parse` output): keys such as `__proto__` are copied as regular keys and never change an object's prototype,
|
|
345
|
+
caseparser is safe to use with untrusted input (e.g. request bodies or `JSON.parse` output): keys such as `__proto__` are copied as regular keys and never change an object's prototype, a `constructor` key doesn't stop an object from being converted, only the object's own properties are converted, and nothing is kept between calls. Limit the depth of untrusted input if a `RangeError` for very deep objects is not handled (see [Behavior and limitations](#behavior-and-limitations)).
|
|
297
346
|
|
|
298
347
|
Releases are built and published from GitHub Actions without long-lived tokens (OIDC), with [npm provenance](https://docs.npmjs.com/generating-provenance-statements), so every published version can be traced back to the exact commit and workflow that built it. On npm, new versions are [staged](https://docs.npmjs.com/staged-publishing/) and only go live after a maintainer approves them with 2FA.
|
|
299
348
|
|