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

@lucidcreative/disguise-asset

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lucidcreative/disguise-asset

a simple library for converting a filepath to a disguise asset object

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

disguise-asset

a simple library for converting a filepath to a disguise asset object.

type-safety is included out of the box.

Disguise asset object?

Disguise (aka d3) uses a set of content management rules to manage version replacements and other magic under the hood of their media server. This library attempts to recreate the logic they use to process a file based on it's file name and path. The resulting object looks like:

interface DisguiseAsset {
	stem: string
	extension: string
	version?: string
	proxyLevel?: number
	frameStart?: number
	originalFilename: string
}

you might notice that version is a string, when all other tags are numbers, and that's because date+letters is also a valid version tag. Versions are always sorted alphabetically.


Benchmark Summary:

CountTime
1310112 μs
1000.762929 ms
10006.511104 ms
1000000171.870434 ms
  • μs = nanoseconds
  • test hardware:
    • Darwin x64
    • Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
    • 16.0 GB RAM
  • all tests done on randomized data, YMMV

brought to you by

Lucid

Keywords

FAQs

Package last updated on 11 Apr 2021

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

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