@types/loader-utils
- Version 3.0.0
- Published
- 7.88 kB
- 2 dependencies
- MIT license
Install
npm i @types/loader-utils
yarn add @types/loader-utils
pnpm add @types/loader-utils
Overview
TypeScript definitions for loader-utils
Index
Functions
function getHashDigest
getHashDigest: ( buffer: Buffer, hashType?: HashType, digestType?: DigestType, maxLength?: number) => string;
Parameter buffer
the content that should be hashed
Parameter hashType
one of
xxhash64
,sha1
,md4
,md5
,sha256
,sha512
or any other node.js supported hash typeParameter digestType
one of
hex
,base26
,base32
,base36
,base49
,base52
,base58
,base62
,base64
,base64safe
Parameter maxLength
the maximum length in chars https://github.com/webpack/loader-utils#gethashdigest
function interpolateName
interpolateName: ( loaderContext: LoaderContext<LoaderInterpolateOption>, name: InterpolateNameType, options?: InterpolateOption) => string;
Interpolates a filename template using multiple placeholders and/or a regular expression. The template and regular expression are set as query params called name and regExp on the current loader's context. https://github.com/webpack/loader-utils#interpolatename
function isUrlRequest
isUrlRequest: (url: string, root?: string) => boolean;
function urlToRequest
urlToRequest: (url: string, root?: string) => string;
Converts some resource URL to a webpack module request. https://github.com/webpack/loader-utils#urltorequest
Interfaces
interface InterpolateOption
interface InterpolateOption {}
interface LoaderInterpolateOption
interface LoaderInterpolateOption {}
property customInterpolateName
customInterpolateName?: typeof interpolateName;
interface OptionObject
interface OptionObject {}
index signature
[key: string]: null | false | true | string;
Type Aliases
type DigestType
type DigestType = | 'hex' | 'base26' | 'base32' | 'base36' | 'base49' | 'base52' | 'base58' | 'base62' | 'base64' | 'base64safe';
type HashType
type HashType = | 'xxhash64' | 'sha1' | 'md4' | 'native-md4' | 'md5' | 'sha256' | 'sha512';
type InterpolateNameType
type InterpolateNameType = | string | ((resourcePath: string, resourceQuery?: string) => string);
type Readonly
type Readonly<T> = { readonly [P in keyof T]: T[P];};
Package Files (1)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/loader-utils
.
- Markdown[](https://www.jsdocs.io/package/@types/loader-utils)
- HTML<a href="https://www.jsdocs.io/package/@types/loader-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2979 ms. - Missing or incorrect documentation? Open an issue for this package.