Skip to content

Commit 09f5a97

Browse files
committed
Doc work
1 parent 1d9ba26 commit 09f5a97

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Ah, now we're getting somewhere. The answer to question 3 might lead to the furt
170170

171171
*I need to generate 10,000 random, unique IDs*.
172172

173-
And the cat's out of the bag. We're getting at the real need, and it's not the same as the original statement. The developer needs *uniqueness* across a total of some number of strings. The length of the string is a by-product of the uniqueness, not the goal.
173+
And the cat's out of the bag. We're getting at the real need, and it's not the same as the original statement. The developer needs *uniqueness* across a total of some number of strings. The length of the string is a by-product of the uniqueness, not the goal, and should not be the primary specification for the random string.
174174

175175
As noted in the [Overview](#Overview), guaranteeing uniqueness is difficult, so we'll replace that declaration with one of *probabilistic uniqueness* by asking:
176176

@@ -325,19 +325,23 @@ The available `CharSet`s are *charSet64*, *charSet32*, *charSet16*, *charSet8*,
325325

326326
- CharSet 64: **ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_**
327327
* The file system and URL safe char set from [RFC 4648](https://tools.ietf.org/html/rfc4648#section-5).
328+
 
328329
- CharSet 32: **2346789bdfghjmnpqrtBDFGHJLMNPQRT**
329330
* Remove all upper and lower case vowels (including y)
330331
* Remove all numbers that look like letters
331332
* Remove all letters that look like numbers
332333
* Remove all letters that have poor distinction between upper and lower case values.
333334
The resulting strings don't look like English words and are easy to parse visually.
334-
335+
 
335336
- CharSet 16: **0123456789abcdef**
336337
* Hexadecimal
338+
 
337339
- CharSet 8: **01234567**
338340
* Octal
341+
 
339342
- CharSet 4: **ATCG**
340343
* DNA alphabet. No good reason; just wanted to get away from the obvious.
344+
 
341345
- CharSet 2: **01**
342346
* Binary
343347

@@ -367,7 +371,7 @@ The resulting string of __0__'s and __1__'s doesn't look quite right. Perhaps yo
367371

368372
> flips: THHTHTTHHT
369373
370-
As another example, we saw in [Character Sets](#CharacterSets) the predefined characters for `charSet16` are **0123456789abcdef**. Suppose you like uppercase hexadecimal letters instead.
374+
As another example, we saw in [Character Sets](#CharacterSets) the predefined hex characters for `charSet16` are lowercase. Suppose you like uppercase hexadecimal letters instead.
371375

372376
```js
373377
import {Random} from 'entropy-string'
@@ -385,7 +389,7 @@ The `Random` constructor allows for three separate cases:
385389
- One of six predefined `CharSet`s can be specified.
386390
- A string representing the characters to use can be specified.
387391

388-
The 3rd option above will throw an `EntropyStringError` if the characters string isn't appropriate for creating a `CharSet`.
392+
The last option above will throw an `EntropyStringError` if the characters string isn't appropriate for creating a `CharSet`.
389393
```js
390394
import {Random} from 'entropy-string'
391395

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy