Skip to content

Commit

Permalink
refactor: switch from cjs to ES6
Browse files Browse the repository at this point in the history
BREAKING_CHANGE
  • Loading branch information
GiorgioBrux committed Dec 8, 2021
1 parent 8e3d8c2 commit 4496800
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ npm install sankaku-client
## Example

```js
const {Client} = require('sankaku-client')
import Client from 'sankaku-client';

let client = new Client();
client.searchSubmissions({limit: 1, order_by: 'random'})
.then((r) => {console.log(r[0])})
.then((r) => {console.log(r[0])});
```
For full documentation, check [the wiki](https://github.com/GiorgioBrux/sankaku-client/wiki).

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"sankaku complex",
"sankaku"
],
"type": "module",
"author": "GiorgioBrux",
"license": "MIT",
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const axios = require('axios');
const jwt_decode = require('jwt-decode');
import axios from 'axios';
import jwt_decode from 'jwt-decode';

/**
* Sankaku-api client
Expand Down Expand Up @@ -597,4 +597,4 @@ class Client {
}
}

module.exports = { Client };
export default Client;

0 comments on commit 4496800

Please sign in to comment.