1.2.3 • Published 4 months ago

getjsontable v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

getjsontable

JS library which helps to get some site table converted to json

⚠️ NOTE: this library may work unstable, so please create an issue if you encounter an error

Installation

with NPM

npm install getjsontable

with YARN

yarn add getjsontable

Code example

If you're using ES modules

import table from "getjsontable";
table("https://sa-mp.ru/adminhistory-aurum", "post", undefined, {
  hideColumnsDescription: true,
})
  .then((res) => console.log(res[0]))
  .catch((err) => {
    console.log(err);
    console.log(`this is an error`);
  });

If you're using CommonJS

But it will be better if you will use ES modules

const table = require("getjsontable").default;
table("https://sa-mp.ru/adminhistory-aurum", "post", undefined, {
  hideColumnsDescription: true,
})
  .then((res) => console.log(res[0]))
  .catch((err) => {
    console.log(err);
    console.log(`this is an error`);
  });
OptionType
urlstring
methodstring
axiosOptions (options of http request)AxiosRequestConfig<any,any> (docs reference)
optionsIOptions

IOptions type

OptionExplanation
hideColumnsDescription (boolean)Hide the columns explanation

Result

[
  {'0': <first column data of first row>, '1': <second column data of first row>, .... }
]
1.2.3

4 months ago

1.2.2

4 months ago

1.2.0

4 months ago

1.0.21

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago