Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/string_decoder.js
6174 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's string_decoder module. Depends on the buffer module.
19
* @see http://nodejs.org/api/string_decoder.html
20
* @see https://github.com/joyent/node/blob/master/lib/string_decoder.js
21
* @externs
22
* @author Daniel Wirtz <[email protected]>
23
*/
24
25
/**
26
BEGIN_NODE_INCLUDE
27
var StringDecoder = require('string_decoder');
28
END_NODE_INCLUDE
29
*/
30
31
/**
32
* @param {string} encoding
33
* @constructor
34
*/
35
var StringDecoder = function(encoding) {};
36
37
/**
38
* @param {nodeBuffer.Buffer} buffer
39
* @return {string}
40
*/
41
StringDecoder.prototype.write = function(buffer) {};
42
43
/**
44
* @return {string}
45
*/
46
StringDecoder.prototype.toString = function() {};
47
48
/**
49
* @param {nodeBuffer.Buffer} buffer
50
* @return {number}
51
*/
52
StringDecoder.prototype.detectIncompleteChar = function(buffer) {};
53
54
/**
55
* @param {nodeBuffer.Buffer} buffer
56
* @return {string}
57
*/
58
StringDecoder.prototype.end = function(buffer) {};
59
60