steam-tradeoffer-url-parser
v1.0.1
Published
Parses a steam tradeoffer url and gives a URL, token and partner params
Downloads
10
Readme
node-steam-tradeoffer-url-parser
Parses a steam tradeoffer url and gives a URL, token and partner params
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);
});