source: imaps-frontend/node_modules/webpack-sources/lib/SizeOnlySource.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 602 bytes
RevLine 
[79a0317]1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5"use strict";
6
7const Source = require("./Source");
8
9class SizeOnlySource extends Source {
10 constructor(size) {
11 super();
12 this._size = size;
13 }
14
15 _error() {
16 return new Error(
17 "Content and Map of this Source is not available (only size() is supported)"
18 );
19 }
20
21 size() {
22 return this._size;
23 }
24
25 source() {
26 throw this._error();
27 }
28
29 buffer() {
30 throw this._error();
31 }
32
33 map(options) {
34 throw this._error();
35 }
36
37 updateHash() {
38 throw this._error();
39 }
40}
41
42module.exports = SizeOnlySource;
Note: See TracBrowser for help on using the repository browser.