WXL
3 天以前 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7
node_modules/webpack-sources/README.md
@@ -12,6 +12,7 @@
#### `source`
<!-- eslint-skip -->
```typescript
Source.prototype.source() -> String | Buffer
```
@@ -20,6 +21,7 @@
#### `buffer`
<!-- eslint-skip -->
```typescript
Source.prototype.buffer() -> Buffer
```
@@ -28,6 +30,7 @@
#### `size`
<!-- eslint-skip -->
```typescript
Source.prototype.size() -> Number
```
@@ -36,6 +39,7 @@
#### `map`
<!-- eslint-skip -->
```typescript
Source.prototype.map(options?: Object) -> Object | null
```
@@ -48,6 +52,7 @@
#### `sourceAndMap`
<!-- eslint-skip -->
```typescript
Source.prototype.sourceAndMap(options?: Object) -> {
   source: String | Buffer,
@@ -61,6 +66,7 @@
#### `updateHash`
<!-- eslint-skip -->
```typescript
Source.prototype.updateHash(hash: Hash) -> void
```
@@ -71,6 +77,7 @@
Represents source code without SourceMap.
<!-- eslint-skip -->
```typescript
new RawSource(sourceCode: String | Buffer)
```
@@ -79,6 +86,7 @@
Represents source code, which is a copy of the original file.
<!-- eslint-skip -->
```typescript
new OriginalSource(
   sourceCode: String | Buffer,
@@ -95,6 +103,7 @@
Represents source code with SourceMap, optionally having an additional SourceMap for the original source.
<!-- eslint-skip -->
```typescript
new SourceMapSource(
   sourceCode: String | Buffer,
@@ -121,6 +130,7 @@
Decorates a `Source` and caches returned results of `map`, `source`, `buffer`, `size` and `sourceAndMap` in memory. `updateHash` is not cached.
It tries to reused cached results from other methods to avoid calculations, i. e. when `source` is already cached, calling `size` will get the size from the cached source, calling `sourceAndMap` will only call `map` on the wrapped Source.
<!-- eslint-skip -->
```typescript
new CachedSource(source: Source)
new CachedSource(source: Source | () => Source, cachedData?: CachedData)
@@ -146,6 +156,7 @@
Prefix every line of the decorated `Source` with a provided string.
<!-- eslint-skip -->
```typescript
new PrefixSource(
   prefix: String,
@@ -157,6 +168,7 @@
Concatenate multiple `Source`s or strings to a single source.
<!-- eslint-skip -->
```typescript
new ConcatSource(
   ...items?: Source | String
@@ -167,6 +179,7 @@
#### `add`
<!-- eslint-skip -->
```typescript
ConcatSource.prototype.add(item: Source | String)
```
@@ -184,6 +197,7 @@
#### `replace`
<!-- eslint-skip -->
```typescript
ReplaceSource.prototype.replace(
   start: Number,
@@ -198,6 +212,7 @@
#### `insert`
<!-- eslint-skip -->
```typescript
ReplaceSource.prototype.insert(
   pos: Number,
@@ -221,6 +236,7 @@
#### static `from`
<!-- eslint-skip -->
```typescript
CompatSource.from(sourceLike: any | Source)
```