isbn3 1.1.42 → 1.1.44

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 CHANGED
@@ -6,7 +6,7 @@ An ISBN JavaScript Library.
6
6
 
7
7
  Please note that this is a fork of [isbn2](https://www.npmjs.com/package/isbn2), which was a fork of [isbn](https://www.npmjs.com/package/isbn) package which was forked from the original [isbnjs](https://code.google.com/p/isbnjs/) project on Google Code.
8
8
 
9
- [Ranges data](https://github.com/inventaire/isbn3/blob/master/lib/groups.js) are generated from [isbn-international.org](https://www.isbn-international.org) data.
9
+ [Ranges data](https://github.com/inventaire/isbn3/blob/main/lib/groups.js) are generated from [isbn-international.org](https://www.isbn-international.org) data.
10
10
 
11
11
  Added features compared to `isbn2`:
12
12
  * recover common errors:
@@ -308,7 +308,7 @@ Running `npm run benchmark` a few times on some Linux machine with Node.Js `v8.1
308
308
  - load module: 4.5ms
309
309
  - parse 4960 non-hyphenated ISBNs in around 285ms
310
310
 
311
- The difference is mainly due to the [generation of a map of groups in `isbn3`](https://github.com/inventaire/isbn3/blob/master/lib/get_group.js), which takes more time a initialization but makes groups lookups much faster.
311
+ The difference is mainly due to the [generation of a map of groups in `isbn3`](https://github.com/inventaire/isbn3/blob/main/lib/get_group.js), which takes more time a initialization but makes groups lookups much faster.
312
312
 
313
313
  ## Development
314
314
 
@@ -322,12 +322,12 @@ npm test
322
322
 
323
323
  ### Update Groups data
324
324
 
325
- [Groups data](https://github.com/inventaire/isbn3/blob/master/lib/groups.js) are fetched from isbn-international.org, and are critical to how this lib parses ISBNs. Unfortunately, those groups aren't fixed once for all, and we need to update those data periodically.
325
+ [Groups data](https://github.com/inventaire/isbn3/blob/main/lib/groups.js) are fetched from isbn-international.org, and are critical to how this lib parses ISBNs. Unfortunately, those groups aren't fixed once for all, and we need to update those data periodically.
326
326
 
327
- Once a month, a [CI job](https://github.com/inventaire/isbn3/blob/master/.github/workflows/auto_update_groups_data.yml) takes care of updating ISBN groups data and publishing a patch version:
327
+ Once a month, a [CI job](https://github.com/inventaire/isbn3/blob/main/.github/workflows/auto_update_groups_data.yml) takes care of updating ISBN groups data and publishing a patch version:
328
328
  ![Auto-update groups data](https://github.com/inventaire/isbn3/workflows/Update%20groups%20and%20publish/badge.svg)
329
329
 
330
- To get the latest data, you thus just need to update to the latest version (beware of [breaking changes](https://github.com/inventaire/isbn3/blob/master/CHANGELOG.md) if that makes you switch to a new major version though):
330
+ To get the latest data, you thus just need to update to the latest version (beware of [breaking changes](https://github.com/inventaire/isbn3/blob/main/CHANGELOG.md) if that makes you switch to a new major version though):
331
331
 
332
332
  ```sh
333
333
  npm install isbn3@latest
package/lib/groups.js CHANGED
@@ -114,7 +114,11 @@ module.exports = {
114
114
  ],
115
115
  [
116
116
  '05',
117
- '06'
117
+ '05'
118
+ ],
119
+ [
120
+ '0670000',
121
+ '0699999'
118
122
  ],
119
123
  [
120
124
  '0700',
@@ -158,6 +162,18 @@ module.exports = {
158
162
  ],
159
163
  [
160
164
  '74000',
165
+ '76199'
166
+ ],
167
+ [
168
+ '7620',
169
+ '7634'
170
+ ],
171
+ [
172
+ '7635000',
173
+ '7649999'
174
+ ],
175
+ [
176
+ '76500',
161
177
  '77499'
162
178
  ],
163
179
  [
@@ -372,6 +388,14 @@ module.exports = {
372
388
  ],
373
389
  [
374
390
  '200',
391
+ '389'
392
+ ],
393
+ [
394
+ '39',
395
+ '39'
396
+ ],
397
+ [
398
+ '400',
375
399
  '688'
376
400
  ],
377
401
  [
@@ -724,7 +748,7 @@ module.exports = {
724
748
  ]
725
749
  },
726
750
  '978-605': {
727
- name: 'Turkey',
751
+ name: 'Türkiye',
728
752
  ranges: [
729
753
  [
730
754
  '00',
@@ -838,6 +862,14 @@ module.exports = {
838
862
  ],
839
863
  [
840
864
  '600',
865
+ '694'
866
+ ],
867
+ [
868
+ '69500',
869
+ '69999'
870
+ ],
871
+ [
872
+ '700',
841
873
  '749'
842
874
  ],
843
875
  [
@@ -1123,7 +1155,7 @@ module.exports = {
1123
1155
  '09'
1124
1156
  ],
1125
1157
  [
1126
- '130',
1158
+ '110',
1127
1159
  '499'
1128
1160
  ],
1129
1161
  [
@@ -1158,7 +1190,7 @@ module.exports = {
1158
1190
  ]
1159
1191
  },
1160
1192
  '978-625': {
1161
- name: 'Turkey',
1193
+ name: 'Türkiye',
1162
1194
  ranges: [
1163
1195
  [
1164
1196
  '00',
@@ -1969,6 +2001,390 @@ module.exports = {
1969
2001
  ],
1970
2002
  [
1971
2003
  '6000',
2004
+ '6387'
2005
+ ],
2006
+ [
2007
+ '638800',
2008
+ '638809'
2009
+ ],
2010
+ [
2011
+ '63881',
2012
+ '63881'
2013
+ ],
2014
+ [
2015
+ '638820',
2016
+ '638839'
2017
+ ],
2018
+ [
2019
+ '63884',
2020
+ '63885'
2021
+ ],
2022
+ [
2023
+ '638860',
2024
+ '638869'
2025
+ ],
2026
+ [
2027
+ '63887',
2028
+ '63889'
2029
+ ],
2030
+ [
2031
+ '6389',
2032
+ '6395'
2033
+ ],
2034
+ [
2035
+ '639600',
2036
+ '639609'
2037
+ ],
2038
+ [
2039
+ '63961',
2040
+ '63962'
2041
+ ],
2042
+ [
2043
+ '639630',
2044
+ '639639'
2045
+ ],
2046
+ [
2047
+ '63964',
2048
+ '63964'
2049
+ ],
2050
+ [
2051
+ '639650',
2052
+ '639659'
2053
+ ],
2054
+ [
2055
+ '63966',
2056
+ '63969'
2057
+ ],
2058
+ [
2059
+ '6397',
2060
+ '6399'
2061
+ ],
2062
+ [
2063
+ '640000',
2064
+ '640009'
2065
+ ],
2066
+ [
2067
+ '64001',
2068
+ '64004'
2069
+ ],
2070
+ [
2071
+ '640050',
2072
+ '640059'
2073
+ ],
2074
+ [
2075
+ '64006',
2076
+ '64006'
2077
+ ],
2078
+ [
2079
+ '640070',
2080
+ '640089'
2081
+ ],
2082
+ [
2083
+ '64009',
2084
+ '64009'
2085
+ ],
2086
+ [
2087
+ '6401',
2088
+ '6406'
2089
+ ],
2090
+ [
2091
+ '640700',
2092
+ '640739'
2093
+ ],
2094
+ [
2095
+ '64074',
2096
+ '64074'
2097
+ ],
2098
+ [
2099
+ '640750',
2100
+ '640759'
2101
+ ],
2102
+ [
2103
+ '64076',
2104
+ '64077'
2105
+ ],
2106
+ [
2107
+ '640780',
2108
+ '640799'
2109
+ ],
2110
+ [
2111
+ '6408',
2112
+ '6419'
2113
+ ],
2114
+ [
2115
+ '64200',
2116
+ '64201'
2117
+ ],
2118
+ [
2119
+ '642020',
2120
+ '642029'
2121
+ ],
2122
+ [
2123
+ '64203',
2124
+ '64203'
2125
+ ],
2126
+ [
2127
+ '642040',
2128
+ '642049'
2129
+ ],
2130
+ [
2131
+ '64205',
2132
+ '64206'
2133
+ ],
2134
+ [
2135
+ '642070',
2136
+ '642079'
2137
+ ],
2138
+ [
2139
+ '64208',
2140
+ '64208'
2141
+ ],
2142
+ [
2143
+ '642090',
2144
+ '642099'
2145
+ ],
2146
+ [
2147
+ '6421',
2148
+ '6432'
2149
+ ],
2150
+ [
2151
+ '64330',
2152
+ '64331'
2153
+ ],
2154
+ [
2155
+ '643320',
2156
+ '643329'
2157
+ ],
2158
+ [
2159
+ '64333',
2160
+ '64333'
2161
+ ],
2162
+ [
2163
+ '643340',
2164
+ '643359'
2165
+ ],
2166
+ [
2167
+ '64336',
2168
+ '64336'
2169
+ ],
2170
+ [
2171
+ '643370',
2172
+ '643379'
2173
+ ],
2174
+ [
2175
+ '64338',
2176
+ '64339'
2177
+ ],
2178
+ [
2179
+ '6434',
2180
+ '6435'
2181
+ ],
2182
+ [
2183
+ '643600',
2184
+ '643609'
2185
+ ],
2186
+ [
2187
+ '64361',
2188
+ '64363'
2189
+ ],
2190
+ [
2191
+ '643640',
2192
+ '643659'
2193
+ ],
2194
+ [
2195
+ '64366',
2196
+ '64366'
2197
+ ],
2198
+ [
2199
+ '643670',
2200
+ '643679'
2201
+ ],
2202
+ [
2203
+ '64368',
2204
+ '64369'
2205
+ ],
2206
+ [
2207
+ '6437',
2208
+ '6443'
2209
+ ],
2210
+ [
2211
+ '644400',
2212
+ '644409'
2213
+ ],
2214
+ [
2215
+ '64441',
2216
+ '64441'
2217
+ ],
2218
+ [
2219
+ '644420',
2220
+ '644429'
2221
+ ],
2222
+ [
2223
+ '64443',
2224
+ '64443'
2225
+ ],
2226
+ [
2227
+ '644440',
2228
+ '644449'
2229
+ ],
2230
+ [
2231
+ '64445',
2232
+ '64446'
2233
+ ],
2234
+ [
2235
+ '644470',
2236
+ '644489'
2237
+ ],
2238
+ [
2239
+ '64449',
2240
+ '64449'
2241
+ ],
2242
+ [
2243
+ '6445',
2244
+ '6450'
2245
+ ],
2246
+ [
2247
+ '64510',
2248
+ '64512'
2249
+ ],
2250
+ [
2251
+ '645130',
2252
+ '645139'
2253
+ ],
2254
+ [
2255
+ '64514',
2256
+ '64515'
2257
+ ],
2258
+ [
2259
+ '645160',
2260
+ '645199'
2261
+ ],
2262
+ [
2263
+ '6452',
2264
+ '6458'
2265
+ ],
2266
+ [
2267
+ '645900',
2268
+ '645909'
2269
+ ],
2270
+ [
2271
+ '64591',
2272
+ '64592'
2273
+ ],
2274
+ [
2275
+ '645930',
2276
+ '645949'
2277
+ ],
2278
+ [
2279
+ '64595',
2280
+ '64596'
2281
+ ],
2282
+ [
2283
+ '645970',
2284
+ '645989'
2285
+ ],
2286
+ [
2287
+ '64599',
2288
+ '64599'
2289
+ ],
2290
+ [
2291
+ '6460',
2292
+ '6465'
2293
+ ],
2294
+ [
2295
+ '646600',
2296
+ '646609'
2297
+ ],
2298
+ [
2299
+ '64661',
2300
+ '64662'
2301
+ ],
2302
+ [
2303
+ '646630',
2304
+ '646659'
2305
+ ],
2306
+ [
2307
+ '64666',
2308
+ '64666'
2309
+ ],
2310
+ [
2311
+ '646670',
2312
+ '646689'
2313
+ ],
2314
+ [
2315
+ '64669',
2316
+ '64669'
2317
+ ],
2318
+ [
2319
+ '6467',
2320
+ '6474'
2321
+ ],
2322
+ [
2323
+ '64750',
2324
+ '64751'
2325
+ ],
2326
+ [
2327
+ '647520',
2328
+ '647539'
2329
+ ],
2330
+ [
2331
+ '64754',
2332
+ '64754'
2333
+ ],
2334
+ [
2335
+ '647550',
2336
+ '647559'
2337
+ ],
2338
+ [
2339
+ '64756',
2340
+ '64757'
2341
+ ],
2342
+ [
2343
+ '647580',
2344
+ '647589'
2345
+ ],
2346
+ [
2347
+ '64759',
2348
+ '64759'
2349
+ ],
2350
+ [
2351
+ '6476',
2352
+ '6476'
2353
+ ],
2354
+ [
2355
+ '647700',
2356
+ '647708'
2357
+ ],
2358
+ [
2359
+ '64771',
2360
+ '64771'
2361
+ ],
2362
+ [
2363
+ '647800',
2364
+ '647809'
2365
+ ],
2366
+ [
2367
+ '64781',
2368
+ '64781'
2369
+ ],
2370
+ [
2371
+ '647820',
2372
+ '647829'
2373
+ ],
2374
+ [
2375
+ '64783',
2376
+ '64786'
2377
+ ],
2378
+ [
2379
+ '647870',
2380
+ '647879'
2381
+ ],
2382
+ [
2383
+ '64788',
2384
+ '64789'
2385
+ ],
2386
+ [
2387
+ '6479',
1972
2388
  '8999'
1973
2389
  ],
1974
2390
  [
@@ -2085,10 +2501,10 @@ module.exports = {
2085
2501
  ],
2086
2502
  [
2087
2503
  '150',
2088
- '479'
2504
+ '459'
2089
2505
  ],
2090
2506
  [
2091
- '48000',
2507
+ '46000',
2092
2508
  '49999'
2093
2509
  ],
2094
2510
  [
@@ -2867,7 +3283,7 @@ module.exports = {
2867
3283
  ]
2868
3284
  },
2869
3285
  '978-975': {
2870
- name: 'Turkey',
3286
+ name: 'Türkiye',
2871
3287
  ranges: [
2872
3288
  [
2873
3289
  '00000',
@@ -3369,11 +3785,15 @@ module.exports = {
3369
3785
  name: 'Uzbekistan',
3370
3786
  ranges: [
3371
3787
  [
3372
- '730',
3373
- '749'
3788
+ '01',
3789
+ '08'
3790
+ ],
3791
+ [
3792
+ '710',
3793
+ '799'
3374
3794
  ],
3375
3795
  [
3376
- '9650',
3796
+ '9250',
3377
3797
  '9999'
3378
3798
  ]
3379
3799
  ]
@@ -3430,7 +3850,7 @@ module.exports = {
3430
3850
  ranges: [
3431
3851
  [
3432
3852
  '40',
3433
- '52'
3853
+ '55'
3434
3854
  ],
3435
3855
  [
3436
3856
  '700',
@@ -3480,11 +3900,7 @@ module.exports = {
3480
3900
  ],
3481
3901
  [
3482
3902
  '80',
3483
- '84'
3484
- ],
3485
- [
3486
- '850',
3487
- '899'
3903
+ '91'
3488
3904
  ],
3489
3905
  [
3490
3906
  '9250',
@@ -3619,7 +4035,7 @@ module.exports = {
3619
4035
  ],
3620
4036
  [
3621
4037
  '10',
3622
- '59'
4038
+ '69'
3623
4039
  ],
3624
4040
  [
3625
4041
  '700',
@@ -3817,7 +4233,11 @@ module.exports = {
3817
4233
  ],
3818
4234
  [
3819
4235
  '400',
3820
- '899'
4236
+ '869'
4237
+ ],
4238
+ [
4239
+ '87',
4240
+ '89'
3821
4241
  ],
3822
4242
  [
3823
4243
  '9000',
@@ -4068,7 +4488,7 @@ module.exports = {
4068
4488
  ]
4069
4489
  },
4070
4490
  '978-9944': {
4071
- name: 'Turkey',
4491
+ name: 'Türkiye',
4072
4492
  ranges: [
4073
4493
  [
4074
4494
  '0000',
@@ -6601,8 +7021,12 @@ module.exports = {
6601
7021
  name: 'Srpska, Republic of',
6602
7022
  ranges: [
6603
7023
  [
6604
- '0',
6605
- '0'
7024
+ '00',
7025
+ '03'
7026
+ ],
7027
+ [
7028
+ '075',
7029
+ '099'
6606
7030
  ],
6607
7031
  [
6608
7032
  '10',
@@ -6694,10 +7118,10 @@ module.exports = {
6694
7118
  ],
6695
7119
  [
6696
7120
  '30',
6697
- '59'
7121
+ '64'
6698
7122
  ],
6699
7123
  [
6700
- '750',
7124
+ '700',
6701
7125
  '999'
6702
7126
  ]
6703
7127
  ]
@@ -6707,14 +7131,22 @@ module.exports = {
6707
7131
  ranges: [
6708
7132
  [
6709
7133
  '0',
6710
- '1'
7134
+ '0'
7135
+ ],
7136
+ [
7137
+ '140',
7138
+ '149'
7139
+ ],
7140
+ [
7141
+ '15',
7142
+ '19'
6711
7143
  ],
6712
7144
  [
6713
7145
  '200',
6714
7146
  '219'
6715
7147
  ],
6716
7148
  [
6717
- '24',
7149
+ '22',
6718
7150
  '74'
6719
7151
  ],
6720
7152
  [
@@ -6902,6 +7334,23 @@ module.exports = {
6902
7334
  ]
6903
7335
  ]
6904
7336
  },
7337
+ '978-99994': {
7338
+ name: 'Haiti',
7339
+ ranges: [
7340
+ [
7341
+ '0',
7342
+ '0'
7343
+ ],
7344
+ [
7345
+ '50',
7346
+ '52'
7347
+ ],
7348
+ [
7349
+ '985',
7350
+ '999'
7351
+ ]
7352
+ ]
7353
+ },
6905
7354
  '979-10': {
6906
7355
  name: 'France',
6907
7356
  ranges: [
@@ -6966,6 +7415,10 @@ module.exports = {
6966
7415
  [
6967
7416
  '80000',
6968
7417
  '84999'
7418
+ ],
7419
+ [
7420
+ '985000',
7421
+ '999999'
6969
7422
  ]
6970
7423
  ]
6971
7424
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "isbn3",
3
3
  "description": "ISBN utils: parse, validate, format, audit",
4
- "version": "1.1.42",
4
+ "version": "1.1.44",
5
5
  "authors": [
6
6
  "Hetappi <hetappi.pm@gmail.com>",
7
7
  "Tadas S. <tadas@yoyo.lt>",
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env bash
2
- git checkout master
2
+ git checkout main
3
3
  git push --tags
@@ -2,7 +2,7 @@
2
2
  set -eu
3
3
 
4
4
  # Update the dist branch
5
- git checkout master
5
+ git checkout main
6
6
  git checkout -B dist
7
7
  npm run update-dist
8
8
  git add --force ./dist