Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@singlestore/elegance-sdk

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@singlestore/elegance-sdk - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

3

package.json
{
"name": "@singlestore/elegance-sdk",
"version": "0.0.9",
"version": "0.0.10",
"license": "Apache-2.0",

@@ -47,3 +47,2 @@ "main": "./dist/index.js",

"dependencies": {
"bson-objectid": "^2.0.4",
"csv-parser": "3.0.0",

@@ -50,0 +49,0 @@ "mongodb": "^5.8.0",

'use strict';
var OpenAI = require('openai');
var csvParser = require('csv-parser');
var pdf = require('pdf-parse/lib/pdf-parse');
var mongodb = require('mongodb');

@@ -12,4 +10,2 @@ var mysql2 = require('mysql2');

var OpenAI__default = /*#__PURE__*/_interopDefault(OpenAI);
var csvParser__default = /*#__PURE__*/_interopDefault(csvParser);
var pdf__default = /*#__PURE__*/_interopDefault(pdf);

@@ -86,18 +82,23 @@ var __defProp = Object.defineProperty;

}
// src/server/utils/csv.ts
function csvStringToArray(csvString) {
return new Promise((resolve, reject) => {
const data = [];
const stream = csvParser__default.default();
stream.on("data", (row) => {
const text = Object.entries(row).map(([key, value]) => `\\${key}: ${value}`).join("");
data.push(text);
return __async(this, null, function* () {
const csvParser = (yield import('csv-parser')).default;
return new Promise((resolve, reject) => {
const data = [];
const stream = csvParser();
stream.on("data", (row) => {
const text = Object.entries(row).map(([key, value]) => `\\${key}: ${value}`).join("");
data.push(text);
});
stream.on("end", () => {
resolve(data);
});
stream.on("error", (error) => {
reject(error);
});
stream.write(csvString);
stream.end();
});
stream.on("end", () => {
resolve(data);
});
stream.on("error", (error) => {
reject(error);
});
stream.write(csvString);
stream.end();
});

@@ -121,5 +122,8 @@ }

}
// src/server/utils/pdf.ts
function pdfBufferToString(buffer) {
return __async(this, null, function* () {
return (yield pdf__default.default(buffer)).text;
const pdf = (yield import('pdf-parse/lib/pdf-parse')).default;
return (yield pdf(buffer)).text;
});

@@ -126,0 +130,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc