MCPcopy Create free account
hub / github.com/Keyang/node-csvtojson / bufFromString

Function bufFromString

v1/core/Converter.js:90–97  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

88
89
90function bufFromString(str) {
91 var length=Buffer.byteLength(str);
92 var buffer = Buffer.allocUnsafe
93 ? Buffer.allocUnsafe(length)
94 : new Buffer(length);
95 buffer.write(str);
96 return buffer;
97}
98
99Converter.prototype._transform = function (data, encoding, cb) {
100 data=this.prepareData(data);

Callers 1

Converter.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected