steam-tradeoffer-url-parser

1.0.1 • Public • Published

node-steam-tradeoffer-url-parser

Parses a steam tradeoffer url and gives a URL, token and partner params

npm version

npm install steam-tradeoffer-url-parser
const parse = require('steam-tradeoffer-url-parser');

parse("https://steamcommunity.com/tradeoffer/new/?partner=33230825&token=XXXXXXXX")
.then(parsed => {
    console.log(parsed);
    /*
    {
        url: 'https://steamcommunity.com/tradeoffer/new?partner=33230825&token=XXXXXXXX',
        partner: '33230825',
        token: 'XXXXXXXXX'
    }
    */
})
.catch(err => {
    console.log(err);
});

Package Sidebar

Install

npm i steam-tradeoffer-url-parser

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

2.66 kB

Total Files

4

Last publish

Collaborators

  • jfx