Socket
Socket
Sign inDemoInstall

@skypilot/steampress

Package Overview
Dependencies
52
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1-alpha to 0.4.0-alpha

lib/exporters/formatAsJson.d.ts

3

lib/excel/convertExcelSheetToJson.d.ts
import { ParseExcelSheetOptions } from './parseExcelSheet';
import { TypeScriptFormatterOptions } from '../exporters/formatAsTypeScript';
export interface ConvertExcelSheetToJsonOptions {

@@ -9,4 +10,6 @@ noEmit?: boolean;

outFile?: string;
outFormat?: 'json' | 'typescript';
formatterOptions: TypeScriptFormatterOptions | {};
parserOptions: ParseExcelSheetOptions;
}
export declare function convertExcelSheetToJson(options: ConvertExcelSheetToJsonOptions): object[];

@@ -12,4 +12,19 @@ "use strict";

var _writeToFile = require("../filesystem/writeToFile");
var _formatAsJson = require("../exporters/formatAsJson");
var _formatAsTypeScript = require("../exporters/formatAsTypeScript");
var _writeTextToFile = require("../filesystem/writeTextToFile");
const formats = {
json: {
extension: 'json',
formatter: _formatAsJson.formatAsJson
},
typescript: {
extension: 'ts',
formatter: _formatAsTypeScript.formatAsTypeScript
}
};
function convertExcelSheetToJson(options) {

@@ -22,5 +37,6 @@ const {

outFile = '',
outFormat = 'json',
formatterOptions = {},
parserOptions
} = options;
const baseName = outFile || sheetName;
const excelAsJson = (0, _excelSheetToJson.excelSheetToJson)({

@@ -37,6 +53,11 @@ source,

(0, _writeToFile.writeToFile)(parsedExcel, {
baseName,
format: 'json',
outDir
const {
extension,
formatter
} = formats[outFormat];
const outputText = formatter(parsedExcel, formatterOptions);
const fileName = outFile || `${sheetName}.${extension}`;
(0, _writeTextToFile.writeTextToFile)(outputText, {
dirName: outDir,
fileName
});

@@ -43,0 +64,0 @@ }

2

package.json
{
"name": "@skypilot/steampress",
"version": "0.3.1-alpha",
"version": "0.4.0-alpha",
"description": "Parse, filter, and transform messy spreadsheets into clean object data",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc