0.3.1 • Published 11 months ago

@blackglory/static-js v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

static-js

Install

npm install --save @blackglory/static-js
# or
yarn add @blackglory/static-js

API

StaticURLFactory

interface IStaticURLFactoryOptions {
  server: string
  secret: string
}

interface IDerivedImageMetadata {
  format: 'jpeg' | 'webp'
  quality: number
  maxWidth?: number
  maxHeight?: number
  multiple?: number
}

interface IDerivedFontMetadata {
  format: 'woff' | 'woff2'
  subset: string
}

class StaticURLFactory {
  constructor(options: IStaticURLFactoryOptions)

  createFileURL(filename: string, contentType?: string): string

  createDerivedImageURL(
    filename: string
  , metadata: IDerivedImageMetadata
  , contentType?: string
  ): Promise<string>

  createDerivedFontURL(
    filename: string
  , metadata: IDerivedFontMetadata
  , contentType?: string
  ): Promise<string>
}
0.3.1

11 months ago

0.3.0

1 year ago

0.2.6

2 years ago

0.2.8

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago