fix(bom markers): now handles bom markers correctly

This commit is contained in:
2022-01-03 17:37:44 +01:00
parent ab1c84f41f
commit fd0abaeb47
11 changed files with 26840 additions and 706 deletions

View File

@ -1,14 +1,12 @@
// tslint:disable-next-line:no-implicit-dependencies
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartcsv from '../ts/index';
// tslint:disable-next-line:no-implicit-dependencies
import * as smartfile from '@pushrocks/smartfile';
let fileString: string;
let testCsv: smartcsv.Csv;
tap.test('should read a file', async tools => {
tap.test('should read a file', async (tools) => {
fileString = smartfile.fs.toStringSync('./test/sample.csv');
});
@ -21,7 +19,7 @@ tap.test('should create a valid csv', async () => {
tap.test('should create a valid csv string', async () => {
const createdCsvString = await smartcsv.Csv.createCsvStringFromArray([
{ wow: 'hi', wow2: 'there' },
{ wow: 'really', wow3: 'yes' }
{ wow: 'really', wow3: 'yes' },
]);
console.log(createdCsvString);
});