Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@canvacord/assets

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvacord/assets - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

3

dist/index.d.ts

@@ -7,3 +7,6 @@ declare class AssetManager {

load(): Promise<void>;
clear(): void;
get(name: string): string;
set(name: string, data: string): string;
get size(): number;
}

@@ -10,0 +13,0 @@ declare const _default: {

@@ -23,13 +23,25 @@ "use strict";

load() {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const files = yield fs_1.promises.readdir(this.dir);
for (const file of files) {
const name = file.split(".")[0];
const name = (_a = file.split(".").shift()) !== null && _a !== void 0 ? _a : file;
this.data[name] = `${this.dir}/${file}`;
}
this.loaded = true;
});
}
clear() {
this.data = {};
this.loaded = false;
}
get(name) {
return this.data[name];
}
set(name, data) {
return this.data[name] = data;
}
get size() {
return Object.keys(this.data).length;
}
}

@@ -36,0 +48,0 @@ module.exports = {

2

package.json
{
"name": "@canvacord/assets",
"version": "2.0.1",
"version": "2.0.2",
"description": "Assets used in Canvacord",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc