demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/iconv-lite-0.4.24/lib/bom-handling.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/iconv-lite-0.4.24/lib/bom-handling.js
Status
scanned
Type
file
Name
bom-handling.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1109 (1.1 KB)
MD5
7b3d4519f05bf0cc8d70a4d950c72c55
SHA1
5c6518ce3acc35c3e1da961bc02c110e08f81db2
SHA256
c230d25d8e7fbb50960c634b636b71327c409e9a77e67fe9446b566bdcea362d
SHA512

      
    
SHA1_git
1050872385c7f96b4f54d50ebc873b1031e2528c
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
bom-handling.js | 1.1 KB |

"use strict"; var BOMChar = '\uFEFF'; exports.PrependBOM = PrependBOMWrapper function PrependBOMWrapper(encoder, options) { this.encoder = encoder; this.addBOM = true; } PrependBOMWrapper.prototype.write = function(str) { if (this.addBOM) { str = BOMChar + str; this.addBOM = false; } return this.encoder.write(str); } PrependBOMWrapper.prototype.end = function() { return this.encoder.end(); } //------------------------------------------------------------------------------ exports.StripBOM = StripBOMWrapper; function StripBOMWrapper(decoder, options) { this.decoder = decoder; this.pass = false; this.options = options || {}; } StripBOMWrapper.prototype.write = function(buf) { var res = this.decoder.write(buf); if (this.pass || !res) return res; if (res[0] === BOMChar) { res = res.slice(1); if (typeof this.options.stripBOM === 'function') this.options.stripBOM(); } this.pass = true; return res; } StripBOMWrapper.prototype.end = function() { return this.decoder.end(); }
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/iconv-lite@0.4.24 mit JavaScript