
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@mapado/image-url-builder
Advanced tools
npm install "@mapado/image-url-builder"
or with yarn:
yarn add "@mapado/image-url-builder"
import { buildUrl } from '@mapado/image-url-builder';
const imagePath = '2018/01/foo.jpg';
const fullWidthImage = buildUrl(imagePath);
// will output something like '//img.mapado.net/2018/01/foo.jpg'
You can also specify a width
and a height
to crop / resize the image:
const width = 400;
const height = 300;
const cropedImage = buildUrl(imagePath, width, height);
// will output something like '//img.mapado.net/2018/01/foo_thumbs/400-300.jpg'
If you don't want to resize or apply any filter but want to allow webp
format for compatible browser, you have two options:
allowwebp: 1
0
const webpAllowedImage = buildUrl(imagePath, null, null, {allowwebp: 1});
const alsoWebpAllowedImage = buildUrl(imagePath, 0, 0);
// will both output something like '//img.mapado.net/2018/01/foo.jpg_thumbs/0-0.jpg'
FAQs
Build mapado image in JS
The npm package @mapado/image-url-builder receives a total of 1 weekly downloads. As such, @mapado/image-url-builder popularity was classified as not popular.
We found that @mapado/image-url-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.