
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
shorterurl
Advanced tools
install package:
npm i --save shorterurl
this package is useful when you need to make your string safer and shorter.
you can make your string shorter by method getShorter and this method give you a short token.
for transfer your token to original string you should use method getOriginal and pass your token.
for save the data in your memory instead database you should use method type and pass MEMORY as an argument in that.
for remove your un necessary data you can use method purge and you should pass a timestamp and then purge method delete all data before that time.
shorterurl is a Promise base, so you only need to use it as an await.
shorterurl store a result in a SQLite Database at <your root project>/shorterurl-database/database.sqlite
const shorter = require("shorterurl");
const LONG_URL = "https://www.npmjs.com/package/shorterurl"(
// make string/url Shorter
async () => {
const short = await shorter.getShorter(LONG_URL);
console.log("short url: ", short);
}
)(); // it's gave you a token like "1rfN5BOw3"
if you want to validate
getShortertoken, we have usedshortIdin our package, so you can use shortId for your token validation.
const shorter = require("shorterurl");
const TOKEN = "1rfN5BOw3";
// pass shorter url and get the original url
(async () => {
const original_url = await shorter.getOriginal(TOKEN);
console.log("Original url: ", original_url);
})(); // it's gave you somting like https://www.npmjs.com/package/shorterurl
const shorter = require("shorterurl");
(async () => {
await shorter.purge(Date.now());
console.log("all data is deleted");
})();
const shorter = require("shorterurl");
const LONG_URL = "https://www.npmjs.com/package/shorterurl";
(async () => {
await shorter.type("MEMORY");
const short = await shorter.getShorter(LONG_URL);
console.log("short url: ", short);
})();
FAQs
this package help to us to make url shortener and easier to read
We found that shorterurl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.