var assetUrl = require('asset-url');
assetUrl.getCanonical('http://assets.example.com/:imgId/:options', {
imgId: 1337,
options: {
bw: true
w: 100,
blur: 10,
h: 200
}
});
// Returns
'http://assets.example.com/1337/blur10,bw,h200,w100'
assetUrl.parseOptions('blur10,bw,h200,w100');
// Returns
{
bw: true
w: 100,
blur: 10,
h: 200
}
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
illarra/asset-url
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published