🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@armniko/assets

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@armniko/assets

Javascript/typescript library for fetching, storing and retrieving assets!

npmnpm
Version
1.1.0
Version published
Weekly downloads
36
-28%
Maintainers
1
Weekly downloads
 
Created
Source

Assets

Latest Release pipeline status coverage report

Javascript/typescript library for fetching, storing and retrieving assets!
Supported formats: jpg, jpeg, png, gif, svg

Installation

npm install @armniko/assets

Usage

import {Assets, AssetsBatch, Progress} from '@armniko/assets';

const assetsBatch: AssetsBatch = new AssetsBatch({
    assets: [
        'url/to/asset-1.png',
        'url/to/asset-2.jpg',
    ],
    onLoad: (name: string, progress: Progress): void => {
        console.log('Loaded: ' + name, progress.percents());
    },
    onComplete: (): void => {
        console.log('Done!');
    },
    onError: (url: string, error: Error): void => {
        console.log(url, error);
    }
});

const assets: Assets = new Assets();
assets.fetch(assetsBatch);

Changelog

v1.1.0 Precompile UMD and ESM
v1.0.0 Initial version

Keywords

assets

FAQs

Package last updated on 27 Apr 2024

Did you know?

Socket

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.

Install

Related posts