isbn3 1.1.43 → 1.1.45

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
@@ -388,6 +388,14 @@ module.exports = {
388
388
  ],
389
389
  [
390
390
  '200',
391
+ '389'
392
+ ],
393
+ [
394
+ '39',
395
+ '39'
396
+ ],
397
+ [
398
+ '400',
391
399
  '688'
392
400
  ],
393
401
  [
@@ -420,7 +428,11 @@ module.exports = {
420
428
  ],
421
429
  [
422
430
  '98500',
423
- '99999'
431
+ '99959'
432
+ ],
433
+ [
434
+ '9996',
435
+ '9999'
424
436
  ]
425
437
  ]
426
438
  },
@@ -740,7 +752,7 @@ module.exports = {
740
752
  ]
741
753
  },
742
754
  '978-605': {
743
- name: 'Turkey',
755
+ name: 'Türkiye',
744
756
  ranges: [
745
757
  [
746
758
  '00',
@@ -854,6 +866,14 @@ module.exports = {
854
866
  ],
855
867
  [
856
868
  '600',
869
+ '694'
870
+ ],
871
+ [
872
+ '69500',
873
+ '69999'
874
+ ],
875
+ [
876
+ '700',
857
877
  '749'
858
878
  ],
859
879
  [
@@ -1174,7 +1194,7 @@ module.exports = {
1174
1194
  ]
1175
1195
  },
1176
1196
  '978-625': {
1177
- name: 'Turkey',
1197
+ name: 'Türkiye',
1178
1198
  ranges: [
1179
1199
  [
1180
1200
  '00',
@@ -1985,6 +2005,390 @@ module.exports = {
1985
2005
  ],
1986
2006
  [
1987
2007
  '6000',
2008
+ '6387'
2009
+ ],
2010
+ [
2011
+ '638800',
2012
+ '638809'
2013
+ ],
2014
+ [
2015
+ '63881',
2016
+ '63881'
2017
+ ],
2018
+ [
2019
+ '638820',
2020
+ '638839'
2021
+ ],
2022
+ [
2023
+ '63884',
2024
+ '63885'
2025
+ ],
2026
+ [
2027
+ '638860',
2028
+ '638869'
2029
+ ],
2030
+ [
2031
+ '63887',
2032
+ '63889'
2033
+ ],
2034
+ [
2035
+ '6389',
2036
+ '6395'
2037
+ ],
2038
+ [
2039
+ '639600',
2040
+ '639609'
2041
+ ],
2042
+ [
2043
+ '63961',
2044
+ '63962'
2045
+ ],
2046
+ [
2047
+ '639630',
2048
+ '639639'
2049
+ ],
2050
+ [
2051
+ '63964',
2052
+ '63964'
2053
+ ],
2054
+ [
2055
+ '639650',
2056
+ '639659'
2057
+ ],
2058
+ [
2059
+ '63966',
2060
+ '63969'
2061
+ ],
2062
+ [
2063
+ '6397',
2064
+ '6399'
2065
+ ],
2066
+ [
2067
+ '640000',
2068
+ '640009'
2069
+ ],
2070
+ [
2071
+ '64001',
2072
+ '64004'
2073
+ ],
2074
+ [
2075
+ '640050',
2076
+ '640059'
2077
+ ],
2078
+ [
2079
+ '64006',
2080
+ '64006'
2081
+ ],
2082
+ [
2083
+ '640070',
2084
+ '640089'
2085
+ ],
2086
+ [
2087
+ '64009',
2088
+ '64009'
2089
+ ],
2090
+ [
2091
+ '6401',
2092
+ '6406'
2093
+ ],
2094
+ [
2095
+ '640700',
2096
+ '640739'
2097
+ ],
2098
+ [
2099
+ '64074',
2100
+ '64074'
2101
+ ],
2102
+ [
2103
+ '640750',
2104
+ '640759'
2105
+ ],
2106
+ [
2107
+ '64076',
2108
+ '64077'
2109
+ ],
2110
+ [
2111
+ '640780',
2112
+ '640799'
2113
+ ],
2114
+ [
2115
+ '6408',
2116
+ '6419'
2117
+ ],
2118
+ [
2119
+ '64200',
2120
+ '64201'
2121
+ ],
2122
+ [
2123
+ '642020',
2124
+ '642029'
2125
+ ],
2126
+ [
2127
+ '64203',
2128
+ '64203'
2129
+ ],
2130
+ [
2131
+ '642040',
2132
+ '642049'
2133
+ ],
2134
+ [
2135
+ '64205',
2136
+ '64206'
2137
+ ],
2138
+ [
2139
+ '642070',
2140
+ '642079'
2141
+ ],
2142
+ [
2143
+ '64208',
2144
+ '64208'
2145
+ ],
2146
+ [
2147
+ '642090',
2148
+ '642099'
2149
+ ],
2150
+ [
2151
+ '6421',
2152
+ '6432'
2153
+ ],
2154
+ [
2155
+ '64330',
2156
+ '64331'
2157
+ ],
2158
+ [
2159
+ '643320',
2160
+ '643329'
2161
+ ],
2162
+ [
2163
+ '64333',
2164
+ '64333'
2165
+ ],
2166
+ [
2167
+ '643340',
2168
+ '643359'
2169
+ ],
2170
+ [
2171
+ '64336',
2172
+ '64336'
2173
+ ],
2174
+ [
2175
+ '643370',
2176
+ '643379'
2177
+ ],
2178
+ [
2179
+ '64338',
2180
+ '64339'
2181
+ ],
2182
+ [
2183
+ '6434',
2184
+ '6435'
2185
+ ],
2186
+ [
2187
+ '643600',
2188
+ '643609'
2189
+ ],
2190
+ [
2191
+ '64361',
2192
+ '64363'
2193
+ ],
2194
+ [
2195
+ '643640',
2196
+ '643659'
2197
+ ],
2198
+ [
2199
+ '64366',
2200
+ '64366'
2201
+ ],
2202
+ [
2203
+ '643670',
2204
+ '643679'
2205
+ ],
2206
+ [
2207
+ '64368',
2208
+ '64369'
2209
+ ],
2210
+ [
2211
+ '6437',
2212
+ '6443'
2213
+ ],
2214
+ [
2215
+ '644400',
2216
+ '644409'
2217
+ ],
2218
+ [
2219
+ '64441',
2220
+ '64441'
2221
+ ],
2222
+ [
2223
+ '644420',
2224
+ '644429'
2225
+ ],
2226
+ [
2227
+ '64443',
2228
+ '64443'
2229
+ ],
2230
+ [
2231
+ '644440',
2232
+ '644449'
2233
+ ],
2234
+ [
2235
+ '64445',
2236
+ '64446'
2237
+ ],
2238
+ [
2239
+ '644470',
2240
+ '644489'
2241
+ ],
2242
+ [
2243
+ '64449',
2244
+ '64449'
2245
+ ],
2246
+ [
2247
+ '6445',
2248
+ '6450'
2249
+ ],
2250
+ [
2251
+ '64510',
2252
+ '64512'
2253
+ ],
2254
+ [
2255
+ '645130',
2256
+ '645139'
2257
+ ],
2258
+ [
2259
+ '64514',
2260
+ '64515'
2261
+ ],
2262
+ [
2263
+ '645160',
2264
+ '645199'
2265
+ ],
2266
+ [
2267
+ '6452',
2268
+ '6458'
2269
+ ],
2270
+ [
2271
+ '645900',
2272
+ '645909'
2273
+ ],
2274
+ [
2275
+ '64591',
2276
+ '64592'
2277
+ ],
2278
+ [
2279
+ '645930',
2280
+ '645949'
2281
+ ],
2282
+ [
2283
+ '64595',
2284
+ '64596'
2285
+ ],
2286
+ [
2287
+ '645970',
2288
+ '645989'
2289
+ ],
2290
+ [
2291
+ '64599',
2292
+ '64599'
2293
+ ],
2294
+ [
2295
+ '6460',
2296
+ '6465'
2297
+ ],
2298
+ [
2299
+ '646600',
2300
+ '646609'
2301
+ ],
2302
+ [
2303
+ '64661',
2304
+ '64662'
2305
+ ],
2306
+ [
2307
+ '646630',
2308
+ '646659'
2309
+ ],
2310
+ [
2311
+ '64666',
2312
+ '64666'
2313
+ ],
2314
+ [
2315
+ '646670',
2316
+ '646689'
2317
+ ],
2318
+ [
2319
+ '64669',
2320
+ '64669'
2321
+ ],
2322
+ [
2323
+ '6467',
2324
+ '6474'
2325
+ ],
2326
+ [
2327
+ '64750',
2328
+ '64751'
2329
+ ],
2330
+ [
2331
+ '647520',
2332
+ '647539'
2333
+ ],
2334
+ [
2335
+ '64754',
2336
+ '64754'
2337
+ ],
2338
+ [
2339
+ '647550',
2340
+ '647559'
2341
+ ],
2342
+ [
2343
+ '64756',
2344
+ '64757'
2345
+ ],
2346
+ [
2347
+ '647580',
2348
+ '647589'
2349
+ ],
2350
+ [
2351
+ '64759',
2352
+ '64759'
2353
+ ],
2354
+ [
2355
+ '6476',
2356
+ '6476'
2357
+ ],
2358
+ [
2359
+ '647700',
2360
+ '647708'
2361
+ ],
2362
+ [
2363
+ '64771',
2364
+ '64771'
2365
+ ],
2366
+ [
2367
+ '647800',
2368
+ '647809'
2369
+ ],
2370
+ [
2371
+ '64781',
2372
+ '64781'
2373
+ ],
2374
+ [
2375
+ '647820',
2376
+ '647829'
2377
+ ],
2378
+ [
2379
+ '64783',
2380
+ '64786'
2381
+ ],
2382
+ [
2383
+ '647870',
2384
+ '647879'
2385
+ ],
2386
+ [
2387
+ '64788',
2388
+ '64789'
2389
+ ],
2390
+ [
2391
+ '6479',
1988
2392
  '8999'
1989
2393
  ],
1990
2394
  [
@@ -2101,10 +2505,10 @@ module.exports = {
2101
2505
  ],
2102
2506
  [
2103
2507
  '150',
2104
- '479'
2508
+ '459'
2105
2509
  ],
2106
2510
  [
2107
- '48000',
2511
+ '46000',
2108
2512
  '49999'
2109
2513
  ],
2110
2514
  [
@@ -2883,7 +3287,7 @@ module.exports = {
2883
3287
  ]
2884
3288
  },
2885
3289
  '978-975': {
2886
- name: 'Turkey',
3290
+ name: 'Türkiye',
2887
3291
  ranges: [
2888
3292
  [
2889
3293
  '00000',
@@ -2961,10 +3365,14 @@ module.exports = {
2961
3365
  ],
2962
3366
  [
2963
3367
  '85000',
2964
- '89299'
3368
+ '87399'
2965
3369
  ],
2966
3370
  [
2967
- '893',
3371
+ '8740',
3372
+ '8899'
3373
+ ],
3374
+ [
3375
+ '890',
2968
3376
  '894'
2969
3377
  ],
2970
3378
  [
@@ -2973,10 +3381,10 @@ module.exports = {
2973
3381
  ],
2974
3382
  [
2975
3383
  '90',
2976
- '98'
3384
+ '96'
2977
3385
  ],
2978
3386
  [
2979
- '990',
3387
+ '970',
2980
3388
  '999'
2981
3389
  ]
2982
3390
  ]
@@ -3386,14 +3794,14 @@ module.exports = {
3386
3794
  ranges: [
3387
3795
  [
3388
3796
  '01',
3389
- '05'
3797
+ '08'
3390
3798
  ],
3391
3799
  [
3392
- '730',
3800
+ '710',
3393
3801
  '799'
3394
3802
  ],
3395
3803
  [
3396
- '9400',
3804
+ '9250',
3397
3805
  '9999'
3398
3806
  ]
3399
3807
  ]
@@ -3450,7 +3858,7 @@ module.exports = {
3450
3858
  ranges: [
3451
3859
  [
3452
3860
  '40',
3453
- '52'
3861
+ '55'
3454
3862
  ],
3455
3863
  [
3456
3864
  '700',
@@ -3833,7 +4241,11 @@ module.exports = {
3833
4241
  ],
3834
4242
  [
3835
4243
  '400',
3836
- '899'
4244
+ '869'
4245
+ ],
4246
+ [
4247
+ '87',
4248
+ '89'
3837
4249
  ],
3838
4250
  [
3839
4251
  '9000',
@@ -4084,7 +4496,7 @@ module.exports = {
4084
4496
  ]
4085
4497
  },
4086
4498
  '978-9944': {
4087
- name: 'Turkey',
4499
+ name: 'Türkiye',
4088
4500
  ranges: [
4089
4501
  [
4090
4502
  '0000',
@@ -6040,7 +6452,11 @@ module.exports = {
6040
6452
  ],
6041
6453
  [
6042
6454
  '900',
6043
- '999'
6455
+ '979'
6456
+ ],
6457
+ [
6458
+ '98',
6459
+ '99'
6044
6460
  ]
6045
6461
  ]
6046
6462
  },
@@ -6617,8 +7033,12 @@ module.exports = {
6617
7033
  name: 'Srpska, Republic of',
6618
7034
  ranges: [
6619
7035
  [
6620
- '0',
6621
- '0'
7036
+ '00',
7037
+ '03'
7038
+ ],
7039
+ [
7040
+ '075',
7041
+ '099'
6622
7042
  ],
6623
7043
  [
6624
7044
  '10',
@@ -6710,10 +7130,10 @@ module.exports = {
6710
7130
  ],
6711
7131
  [
6712
7132
  '30',
6713
- '59'
7133
+ '64'
6714
7134
  ],
6715
7135
  [
6716
- '750',
7136
+ '700',
6717
7137
  '999'
6718
7138
  ]
6719
7139
  ]
@@ -6723,14 +7143,22 @@ module.exports = {
6723
7143
  ranges: [
6724
7144
  [
6725
7145
  '0',
6726
- '1'
7146
+ '0'
7147
+ ],
7148
+ [
7149
+ '140',
7150
+ '149'
7151
+ ],
7152
+ [
7153
+ '15',
7154
+ '19'
6727
7155
  ],
6728
7156
  [
6729
7157
  '200',
6730
7158
  '219'
6731
7159
  ],
6732
7160
  [
6733
- '24',
7161
+ '22',
6734
7162
  '74'
6735
7163
  ],
6736
7164
  [
@@ -6918,6 +7346,23 @@ module.exports = {
6918
7346
  ]
6919
7347
  ]
6920
7348
  },
7349
+ '978-99994': {
7350
+ name: 'Haiti',
7351
+ ranges: [
7352
+ [
7353
+ '0',
7354
+ '0'
7355
+ ],
7356
+ [
7357
+ '50',
7358
+ '52'
7359
+ ],
7360
+ [
7361
+ '985',
7362
+ '999'
7363
+ ]
7364
+ ]
7365
+ },
6921
7366
  '979-10': {
6922
7367
  name: 'France',
6923
7368
  ranges: [
@@ -6982,6 +7427,10 @@ module.exports = {
6982
7427
  [
6983
7428
  '80000',
6984
7429
  '84999'
7430
+ ],
7431
+ [
7432
+ '985000',
7433
+ '999999'
6985
7434
  ]
6986
7435
  ]
6987
7436
  },
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.43",
4
+ "version": "1.1.45",
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