You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/csv-generate/lib/browser/index.js
+68-71Lines changed: 68 additions & 71 deletions
Original file line number
Diff line number
Diff line change
@@ -2,81 +2,26 @@
2
2
(function(Buffer){(function(){
3
3
"use strict";
4
4
5
-
function_createForOfIteratorHelper(o,allowArrayLike){varit=typeofSymbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeofo.length==="number"){if(it)o=it;vari=0;varF=functionF(){};return{s: F,n: functionn(){if(i>=o.length)return{done: true};return{done: false,value: o[i++]};},e: functione(_e){throw_e;},f: F};}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}varnormalCompletion=true,didErr=false,err;return{s: functions(){it=it.call(o);},n: functionn(){varstep=it.next();normalCompletion=step.done;returnstep;},e: functione(_e2){didErr=true;err=_e2;},f: functionf(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throwerr;}}};}
function_createForOfIteratorHelper(o,allowArrayLike){varit=typeofSymbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeofo.length==="number"){if(it)o=it;vari=0;varF=functionF(){};return{s: F,n: functionn(){if(i>=o.length)return{done: true};return{done: false,value: o[i++]};},e: functione(_e){throw_e;},f: F};}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}varnormalCompletion=true,didErr=false,err;return{s: functions(){it=it.call(o);},n: functionn(){varstep=it.next();normalCompletion=step.done;returnstep;},e: functione(_e2){didErr=true;err=_e2;},f: functionf(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throwerr;}}};}
@@ -89,7 +34,8 @@ Generator = function (_Generator) {
89
34
}// Call parent constructor
90
35
91
36
92
-
stream.Readable.call(this,options);// Clone and camelize options
37
+
_stream["default"].Readable.call(this,options);// Clone and camelize options
38
+
93
39
94
40
this.options={};
95
41
@@ -153,11 +99,12 @@ Generator = function (_Generator) {
153
99
}
154
100
155
101
returnthis;
156
-
});
102
+
};
157
103
158
-
util.inherits(Generator,stream.Readable);// Export the class
104
+
exports.Generator=Generator;
105
+
106
+
_util["default"].inherits(Generator,_stream["default"].Readable);// Generate a random number between 0 and 1 with 2 decimals. The function is idempotent if it detect the "seed" option.
159
107
160
-
module.exports.Generator=Generator;// Generate a random number between 0 and 1 with 2 decimals. The function is idempotent if it detect the "seed" option.
161
108
162
109
Generator.prototype.random=function(){
163
110
if(this.options.seed){
@@ -344,6 +291,56 @@ Generator.camelize = function (str) {
0 commit comments