Skip to content

Commit

Permalink
chore: bump v2.0.0 (#43)
Browse files Browse the repository at this point in the history
* BREAKING: remove binov.net

* chore: bump cheerio types and remove iso-3166-1

* chore: fock renovate :sed_lyf:

* chore: bump v2.0.0
  • Loading branch information
ArnabXD authored Dec 12, 2022
1 parent 8b12a71 commit 1b3870c
Show file tree
Hide file tree
Showing 11 changed files with 1,785 additions and 130 deletions.
6 changes: 0 additions & 6 deletions .github/renovate.json

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
### Available Sources

- [bins.ws](http://bins.ws)
- [binov.net](http://binov.net)
- [bins.su](http://bins.su)

### Installation
Expand All @@ -30,11 +29,11 @@ const { binLookup } = require('@arnabxd/bin-lookup');

```ts
// using async await
let bindata = await binLookup(439129, 'binov.net');
let bindata = await binLookup(439129, 'bins.su');
console.log(bindata);

// or using callbacks
binLookup(439129).then((data)=> console.log(data));
binLookup(439129).then((data) => console.log(data));
```

### API
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arnabxd/bin-lookup",
"version": "1.3.0",
"version": "2.0.0",
"description": "Search bin details from various bin database",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -30,11 +30,11 @@
"dependencies": {
"axios": "^0.27.2",
"cheerio": "1.0.0-rc.12",
"emoji-flags": "^1.3.0",
"iso-3166-1": "^2.1.1"
"emoji-flags": "^1.3.0"
},
"devDependencies": {
"@ava/typescript": "3.0.1",
"@types/cheerio": "^0.22.31",
"@types/emoji-flags": "1.3.0",
"@types/node": "16.11.43",
"@typescript-eslint/eslint-plugin": "5.30.6",
Expand Down
34 changes: 21 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 0 additions & 70 deletions src/sources/binov-net.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/sources/bins-su.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import cheerio from 'cheerio';
import axios from 'axios';
import iso from 'iso-3166-1';
import emoji from 'emoji-flags';

import { alphaToCountry } from '../utils';

import { NotFound, CustomError } from '../errors';
import { Result } from '../types';

Expand Down Expand Up @@ -46,7 +48,7 @@ export default async (bin: number): Promise<Result> => {
type,
level,
bank,
country: iso.whereAlpha2(country)?.country.toUpperCase() as string,
country: alphaToCountry(country),
countryInfo: {
name: countryInfo.name,
emoji: countryInfo.emoji,
Expand Down
6 changes: 4 additions & 2 deletions src/sources/bins-ws.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import cheerio from 'cheerio';
import axios from 'axios';
import iso from 'iso-3166-1';
import emoji from 'emoji-flags';

import { alphaToCountry } from '../utils';

import { NotFound, CustomError } from '../errors';
import { Result } from '../types';

Expand Down Expand Up @@ -34,7 +36,7 @@ export default async (bin: number): Promise<Result> => {
type,
level,
bank,
country: iso.whereAlpha2(country)?.country.toUpperCase() as string,
country: alphaToCountry(country),
countryInfo: {
name: countryInfo.name,
emoji: countryInfo.emoji,
Expand Down
2 changes: 0 additions & 2 deletions src/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import binovnet from './binov-net';
import binsws from './bins-ws';
import binssu from './bins-su';

Expand All @@ -7,7 +6,6 @@ import { Result, Sites } from '../types';
export const sources: {
[site in Sites]: (bin: number) => Promise<Result>;
} = {
'binov.net': binovnet,
'bins.ws': binsws,
'bins.su': binssu,
};
28 changes: 0 additions & 28 deletions src/sources/tests/binov-net.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export interface Result {
};
}

export type Sites = 'binov.net' | 'bins.ws' | 'bins.su';
export type Sites = 'bins.ws' | 'bins.su';
Loading

0 comments on commit 1b3870c

Please sign in to comment.