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

excel-builder-vanilla

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

excel-builder-vanilla - npm Package Compare versions

Comparing version 3.0.8 to 3.0.9

dist/excel-builder-vanilla.iife.js

44

dist/factory.d.ts

@@ -1,42 +0,2 @@

import { ZipOptions } from 'fflate';
import { Workbook } from './Excel/Workbook';
type InferOutputByType<T extends 'Blob' | 'Uint8Array'> = T extends 'Blob' ? Blob : T extends 'Uint8Array' ? Uint8Array : any;
/**
* Creates a new workbook.
*/
export declare function createWorkbook(): Workbook;
/**
* Turns a workbook into a downloadable file, you can between a 'Blob' or 'Uint8Array',
* and if nothing is provided then 'Blob' will be the default
* @param {Excel/Workbook} workbook - The workbook that is being converted
* @param {'Uint8Array' | 'Blob'} [outputType='Blob'] - defaults to 'Blob'
* @param {Object} [options]
* - `fileFormat` defaults to "xlsx"
* - `mimeType`: a mime type can be provided by the user or auto-detect the mime when undefined (by file extension .xls/.xlsx)
* (user can pass an empty string to completely cancel the mime type altogether)
* - `zipOptions` to specify any `fflate` options to modify how the zip is created.
* @returns {Promise}
*/
export declare function createExcelFile<T extends 'Blob' | 'Uint8Array' = 'Blob'>(workbook: Workbook, outputType?: T, options?: {
fileFormat?: 'xls' | 'xlsx';
mimeType?: string;
zipOptions?: ZipOptions;
}): Promise<InferOutputByType<T>>;
/**
* Download Excel file, currently only supports a "browser" as `downloadType`
* but it could be expended in the future to also other type of platform like NodeJS for example.
* @param {Workbook} workbook
* @param {String} filename - filename (must also include file extension, xls/xlsx)
* @param {Object} [options]
* - `downloadType`: download type (browser/node), currently only a "browser" download as a Blob
* - `mimeType`: a mime type can be provided by the user or auto-detect the mime when undefined (by file extension .xls/.xlsx)
* (user can pass an empty string to completely cancel the mime type altogether)
* - `zipOptions` to specify any `fflate` options to modify how the zip is created.
*/
export declare function downloadExcelFile(workbook: Workbook, filename: string, options?: {
downloadType?: 'browser' | 'node';
mimeType?: string;
zipOptions?: ZipOptions;
}): Promise<void>;
export {};
//# sourceMappingURL=factory.d.ts.map
import 'fflate';
export { i as createExcelFile, h as createWorkbook, j as downloadExcelFile } from './factory-DYFe0uas.js';

@@ -1,5 +0,79 @@

export * from './Excel';
export * from './factory';
export * from './interfaces';
export * from './utilities';
//# sourceMappingURL=index.d.ts.map
export { A as AbsoluteAnchor, C as Chart, D as Drawing, a as Drawings, k as ExcelAlignmentStyle, l as ExcelBorderLineStyle, m as ExcelBorderStyle, E as ExcelColorStyle, n as ExcelColumn, o as ExcelColumnFormat, t as ExcelColumnMetadata, q as ExcelFillStyle, r as ExcelFontStyle, u as ExcelMargin, s as ExcelMetadata, v as ExcelSortState, w as ExcelStyleInstruction, p as ExcelTableColumn, O as OneCellAnchor, b as Pane, P as Picture, R as RelationshipManager, S as SharedStrings, c as SheetView, d as StyleSheet, e as Table, T as TwoCellAnchor, U as Util, W as Workbook, f as Worksheet, X as XMLDOM, g as XMLNode, i as createExcelFile, h as createWorkbook, j as downloadExcelFile } from './factory-DYFe0uas.js';
import 'fflate';
/**
* This is mostly a global spot where all of the relationship managers can get and set
* path information from/to.
* @module Excel/Paths
*/
declare const Paths: {
[path: string]: string;
};
/**
* Converts pixel sizes to 'EMU's, which is what Open XML uses.
*
* @todo clean this up. Code borrowed from http://polymathprogrammer.com/2009/10/22/english-metric-units-and-open-xml/,
* but not sure that it's going to be as accurate as it needs to be.
*
* @param int pixels
* @returns int
*/
declare class Positioning {
static pixelsToEMUs(pixels: number): number;
}
/**
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their
* corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
*
* Though the ">" character is escaped for symmetry, characters like
* ">" and "/" don't need escaping in HTML and have no special meaning
* unless they're part of a tag or unquoted attribute value. See
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
*
* @since 0.1.0
* @category String
* @param {string} [str=''] The string to escape.
* @returns {string} Returns the escaped string.
* @see escapeRegExp, unescape
* @example
*
* escape('fred, barney, & pebbles')
* // => 'fred, barney, &amp; pebbles'
*/
declare const htmlEscape: (str: string) => string;
declare function isObject(value: unknown): value is object;
declare function isPlainObject(value: unknown): boolean;
declare function isString(value: any): value is string;
declare function pick(object: any, keys: string[]): any;
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @since 0.1.0
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @see random
* @example
*
* uniqueId('contact_')
* // => 'contact_104'
*
* uniqueId()
* // => '105'
*/
declare function uniqueId(prefix?: string): string;
export { Paths, Positioning, htmlEscape, isObject, isPlainObject, isString, pick, uniqueId };
{
"name": "excel-builder-vanilla",
"version": "3.0.8",
"version": "3.0.9",
"description": "An easy way of building Excel files with javascript",

@@ -31,3 +31,6 @@ "keywords": [

"type": "module",
"main": "./dist/excel-builder.cjs",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"browser": "dist/excel-builder-vanilla.iife.js",
"unpkg": "dist/excel-builder-vanilla.iife.js",
"types": "./dist/index.d.ts",

@@ -38,7 +41,11 @@ "exports": {

"types": "./dist/index.d.ts",
"default": "./dist/excel-builder.mjs"
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/excel-builder.cjs"
"default": "./dist/index.cjs"
},
"browser": {
"types": "./dist/index.d.cts",
"default": "./dist/excel-builder-vanilla.iife.js"
}

@@ -56,3 +63,3 @@ },

},
"gitHead": "4904941f7a473bb7a854660fce519a90a134ecb5"
"gitHead": "0912be6a46a43beb32437d96dcd01e2881eab4cb"
}

Sorry, the diff of this file is not supported yet

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