From 57d3d0d64d1e3ee315ad646fc71044193f282427 Mon Sep 17 00:00:00 2001 From: Simon Bengtsson Date: Thu, 9 Apr 2020 16:39:54 +0200 Subject: [PATCH] Remove object-assign dependency And use already included polyfill instead --- package.json | 1 - src/models.ts | 3 +-- src/tableDrawer.ts | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fb96bf61..a16b6e8e 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "jspdf": "^1.5.3", "mocha": "^7.1.1", "npm-check-updates": "^4.1.2", - "object-assign": "^4.1.1", "prettier": "2.0.4", "ts-loader": "^6.2.2", "ts-node": "^8.8.2", diff --git a/src/models.ts b/src/models.ts index 3ba0cb3b..c7951a20 100644 --- a/src/models.ts +++ b/src/models.ts @@ -2,11 +2,10 @@ import { defaultConfig, FONT_ROW_RATIO } from './config' import state from './state' import { CellHookData, HookData } from './HookData' import { applyUserStyles, marginOrPadding, styles } from './common' +import { assign } from './polyfills' declare function require(path: string): any -var assign = require('object-assign') - type HookHandler = (data: HookData) => void | boolean type CellHookHandler = (data: CellHookData) => void | boolean diff --git a/src/tableDrawer.ts b/src/tableDrawer.ts index 7647f267..d59c0c70 100644 --- a/src/tableDrawer.ts +++ b/src/tableDrawer.ts @@ -7,8 +7,7 @@ import { } from './common' import { Cell, Row, Table } from './models' import state from './state' - -let assign = require('object-assign') +import { assign } from './polyfills' export function drawTable(table: Table) { let settings = table.settings