forked from sheetjs/sheetjs
		
	- XLSB/XLSX/XLML write comments - BIFF2 write date cells (see #586 h/t @roccomuso) - ODS read cell comments (fixed #315 h/t @yisk) - XLSX / XLSB emit empty comments when necessary - changed node detection logic (fixes #614 h/t @mhenris) - fixes #605 h/t @ylbweb - fixes #233 h/t @hanxi @osecki - fixes #192 h/t @abarik1981 @stla - fixes #183 h/t @aravindkoneru @ryangallen
		
			
				
	
	
		
			17 lines
		
	
	
		
			543 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			543 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| var has_buf = (typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && process.versions.node);
 | |
| 
 | |
| function new_raw_buf(len/*:number*/) {
 | |
| 	/* jshint -W056 */
 | |
| 	return new (has_buf ? Buffer : Array)(len);
 | |
| 	/* jshint +W056 */
 | |
| }
 | |
| 
 | |
| function s2a(s/*:string*/) {
 | |
| 	if(has_buf) return new Buffer(s, "binary");
 | |
| 	return s.split("").map(function(x){ return x.charCodeAt(0) & 0xff; });
 | |
| }
 | |
| 
 | |
| var bconcat = function(bufs) { return [].concat.apply([], bufs); };
 | |
| 
 | |
| var chr0 = /\u0000/g, chr1 = /[\u0001-\u0006]/;
 |