https://github.com/e-e-e/library-lib
A collection of helpful functions for parsing and manipulating library related data.
https://github.com/e-e-e/library-lib
Last synced: 12 months ago
JSON representation
A collection of helpful functions for parsing and manipulating library related data.
- Host: GitHub
- URL: https://github.com/e-e-e/library-lib
- Owner: e-e-e
- Created: 2019-10-16T11:42:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:12:49.000Z (about 3 years ago)
- Last Synced: 2024-04-25T20:01:12.481Z (almost 2 years ago)
- Language: TypeScript
- Size: 763 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# library-lib

A collection of helpful functions for parsing and manipulating library related data.
### Install
```
npm install --save library-lib
```
or
```
yarn install library-lib
```
### Common Usage
##### Convert an isbn10 number to isbn13:
```ts
import { Isbn } from "library-lib";
const isbn10 = '0415389550'
// via Isbn instance
const isbn = Isbn.parse(isbn10)
let isbn13 = isbn.toIsbn13());
// or via static method
isbn13 = Isbn.toIsbn13(isbn10);
```
#### Convert an isbn13 number to isbn10:
```ts
import { Isbn } from "library-lib";
const isbn13 = '978-0-415-38955-6';
// via Isbn instance
const isbn = Isbn.parse(isbn13)
let isbn10 = isbn.toIsbn10());
// or via static method
isbn10 = Isbn.toIsbn10(isbn13);
```
### Documentation
See [TS Docs](https://e-e-e.github.io/library-lib/).