🎩 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.3.0
Version published
Weekly downloads
31
-73.04%
Maintainers
1
Weekly downloads
 
Created
Source

Assets

Latest Release pipeline status coverage report

Javascript/typescript library for fetching, storing and retrieving assets!
Supported font formats: woff, woff2, ttf, otf
Supported image formats: png, webp, jpg, jpeg, svg, gif
Supported audio formats: webm, mp3, ogg, m4a, aac, wav

Installation

npm install @armniko/assets

Usage

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

const assetsBatch: AssetsBatch = new AssetsBatch({
    assets: [
        'url/to/asset-1.png',            // access loaded asset: assets.image('asset-1')
        {asset2: 'url/to/asset-2.jpg'},  // access loaded asset: assets.image('asset2')
    ],
    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.3.0 Added audio loader.
Added webp format.
Migrated from webpack to vite.
v1.2.0 Option to specify custom asset name.
Added font loader.
v1.1.0 Precompile UMD and ESM
v1.0.0 Initial version

Keywords

assets

FAQs

Package last updated on 28 Dec 2025

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