bb26 2.2.0 → 2.2.1
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/package.json +12 -11
- package/readme.md +15 -6
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bb26",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "
|
|
5
|
-
"repository": "github:ptrkcsk/BB26",
|
|
6
|
-
"author": "Patrik Csak <p@trikcsak.com>",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"bugs": {
|
|
9
|
-
"url": "https://github.com/ptrkcsk/BB26/issues"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://github.com/ptrkcsk/BB26#readme",
|
|
3
|
+
"version": "2.2.1",
|
|
4
|
+
"description": "Utilities for working with bijective base-26 numerals",
|
|
12
5
|
"keywords": [
|
|
13
6
|
"base 26",
|
|
14
7
|
"bijective base 26",
|
|
15
8
|
"hexavigesimal",
|
|
16
9
|
"spreadsheet",
|
|
17
10
|
"spreadsheet column",
|
|
18
|
-
"spreadsheet column letters"
|
|
11
|
+
"spreadsheet column letters",
|
|
12
|
+
"license plate serials"
|
|
19
13
|
],
|
|
20
|
-
"
|
|
14
|
+
"homepage": "https://github.com/ptrkcsk/BB26#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/ptrkcsk/BB26/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Patrik Csak <p@trikcsak.com>",
|
|
21
20
|
"files": [
|
|
22
21
|
"dist"
|
|
23
22
|
],
|
|
23
|
+
"main": "dist",
|
|
24
|
+
"repository": "github:ptrkcsk/BB26",
|
|
24
25
|
"scripts": {
|
|
25
26
|
"build": "tsc",
|
|
26
27
|
"format": "xo --fix",
|
package/readme.md
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# BB26
|
|
2
2
|
|
|
3
|
-
[](https://bundlephobia.com/result?p=bb26) [](https://www.npmjs.com/package/bb26) [](https://codeclimate.com/github/ptrkcsk/BB26/test_coverage)
|
|
4
4
|
|
|
5
|
-
JavaScript [bijective base-26](https://en.wikipedia.org/wiki/Bijective_numeration#The_bijective_base-26_system)
|
|
5
|
+
BB26 is a JavaScript library for working with [bijective base-26](https://en.wikipedia.org/wiki/Bijective_numeration#The_bijective_base-26_system) (BB26) numbers
|
|
6
|
+
|
|
7
|
+
## What is bijective base-26 numeration?
|
|
8
|
+
|
|
9
|
+
You're probably familiar with BB26 numeration. It's used for spreadsheet columns, license plate serials, and (probably?) more.
|
|
10
|
+
|
|
11
|
+
Here's an example of decimal (base-10) numbers (the numbers you use every day to count things) compared to their corresponding BB26 numbers:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Decimal: | 1 | 2 | 3 | ... | 24 | 25 | 26 | 27 | 28 | 29 | ...
|
|
15
|
+
BB26: | A | B | C | ... | X | Y | Z | AA | AB | AC | ...
|
|
16
|
+
```
|
|
6
17
|
|
|
7
18
|
## Installation
|
|
8
19
|
|
|
@@ -35,7 +46,7 @@ random(upper: string): string
|
|
|
35
46
|
random(lower: string, upper: string): string
|
|
36
47
|
```
|
|
37
48
|
|
|
38
|
-
Produces a random string between the inclusive lower and upper bounds. If only one argument is provided, a string between 'A' and the given string is returned.
|
|
49
|
+
Produces a random string between the inclusive `lower` and `upper` bounds. If only one argument is provided, a string between `'A'` and the given string is returned.
|
|
39
50
|
|
|
40
51
|
```js
|
|
41
52
|
import { random } from 'bb26'
|
|
@@ -51,9 +62,7 @@ range(end: string): string[]
|
|
|
51
62
|
range(start: string, end: string): string[]
|
|
52
63
|
```
|
|
53
64
|
|
|
54
|
-
Creates an array of bijective base-26 numerals progressing from start up to, but not including, end
|
|
55
|
-
|
|
56
|
-
If end is not specified, it's set to start with start then set to 'A'.
|
|
65
|
+
Creates an array of bijective base-26 numerals progressing from `start` up to, but not including, `end`. If `end` is not specified, it's set to `start` with `start` then set to `'A'`.
|
|
57
66
|
|
|
58
67
|
```js
|
|
59
68
|
import { range } from 'bb26'
|