|
1 | | -# Identifiers - URN |
| 1 | +# This package has been deprecated |
2 | 2 |
|
3 | | -Extract, validate and normalize [URNs](https://en.wikipedia.org/wiki/Uniform_Resource_Name). |
| 3 | +This package has been consolidated into [@altmetric/identifiers](https://github.com/altmetric/identifiers-js). |
4 | 4 |
|
5 | | -**Current version:** 0.2.0 |
6 | | -**Supported Node.js versions:** 18, 20, 22, 23 |
| 5 | +## Migration |
7 | 6 |
|
8 | | -## Installation |
| 7 | +Replace: |
9 | 8 |
|
10 | | -Add the following to your `package.json` via `yarn add identifiers-urn` or `npm install --save identifiers-urn`: |
11 | | - |
12 | | -```shell |
13 | | -"identifiers-urn": "^0.2.0" |
| 9 | +```js |
| 10 | +import { extract } from 'identifiers-urn'; |
14 | 11 | ``` |
15 | 12 |
|
16 | | -## Usage |
17 | | - |
18 | | -Use `extract` to extract all URNs normalised, or `scan` to obtain the originals. |
19 | | - |
20 | | -```javascript |
21 | | -const urn = require("identifiers-urn"); |
| 13 | +With: |
22 | 14 |
|
23 | | -urn.extract("En un pueblo italiano urn:1234:abc al pie de la montaña URN:Foo:bar%23.\\"); |
24 | | -//=> ["urn:1234:abc", "urn:foo:bar%23."] |
25 | | - |
26 | | -urn.scan("En un pueblo italiano urn:1234:abc al pie de la montaña URN:Foo:bar%23.\\"); |
27 | | -//=> ["urn:1234:abc", "URN:Foo:bar%23."] |
| 15 | +```js |
| 16 | +import { extract } from '@altmetric/identifiers/urn'; |
28 | 17 | ``` |
29 | 18 |
|
30 | | -## Other versions |
31 | | - |
32 | | -Other packages are available for different scholar identifiers: |
33 | | - |
34 | | -DOIs (and ISBN-As): https://github.com/altmetric/identifiers-doi |
35 | | -PubMed IDs: https://github.com/altmetric/identifiers-pubmed |
36 | | -arXiv IDs: https://github.com/altmetric/identifiers-arxiv |
37 | | -ORCID: https://github.com/altmetric/identifiers-orcid |
38 | | -Handles: https://github.com/altmetric/identifiers-handle |
39 | | -National Clinical Trials IDs: https://github.com/altmetric/identifiers-nct |
40 | | -ADS Bibcodes : https://github.com/altmetric/identifiers-bibcode |
41 | | -RePEc IDs: https://github.com/altmetric/identifiers-repec |
42 | | - |
43 | | -We also maintain versions of these libraries for [Ruby](https://github.com/altmetric/identifiers) and [PHP](https://github.com/altmetric/php-identifiers). |
44 | | - |
45 | | -## License |
46 | | - |
47 | | -Copyright © 2017-2024 Altmetric LLP |
48 | | - |
49 | | -Distributed under the [MIT License](http://opensource.org/licenses/MIT). |
| 19 | +See the [@altmetric/identifiers README](https://github.com/altmetric/identifiers-js#readme) for full documentation. |
0 commit comments