Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@dhar/url-courte
Advanced tools
My own super simple algorithmically reversible, personal URL shortener.
My own super simple algorithmically reversible, personal URL shortener.
Inpired by :
npm install @dhar/url-courte
shorten(date, category, ordinal)
Converts a published date, category, and ordinal into a url-courte URL fragment.
import { shorten } from '@dhar/url-courte'
const d = new Date('2023-02-03')
const shortenedFragment = shorten('articles', d, 1)
// --> returns 'a202302031'
category
: named category, typically something like 'articles', 'notes', 'pictures', or anything that make sense on your website/blogdate
: A JS Date object, typically the publication date.ordinal
: a digit to indicate the nth ordinal post of that type for that dayexpand(fragment, [categoryMapping])
Converts a shortened URL fragment (i.e. 'a202301082') into an expanded url-courte URL fragment (i.e. 'articles/2023/01/08/2'). Return an empty string if the provided fragment doesn't match the expected format.
import { expand } from '@dhar/url-courte'
const d = new Date('2023-02-03')
const expandedFragment = expand('a202301182', {
'a': 'articles',
'n': 'notes',
})
// --> returns 'articles/2023/01/18/2'
fragment
: the short URL fragment to expandcategoryMapping
(optional): A mapping to match the first letter of the fragment. If ommitted, the single letter from the fragment is used.FAQs
My own super simple algorithmically reversible, personal URL shortener.
The npm package @dhar/url-courte receives a total of 2 weekly downloads. As such, @dhar/url-courte popularity was classified as not popular.
We found that @dhar/url-courte demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.