Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "xdim", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Multi-Dimensional Functions. Create, Query, and Transform Multi-Dimensional Data.", | ||
@@ -5,0 +5,0 @@ "main": "src/xdim.js", |
@@ -94,3 +94,3 @@ # xdim | ||
:sparkles: So what magic makes the prepared select statements so fast? We pre-generate | ||
[select functions](https://github.com/DanielJDufour/xdim/blob/main/src/funcs.js), so that JavaScript compilers | ||
[select functions](https://github.com/DanielJDufour/xdim/blob/main/src/prepared-select-funcs.js), so that JavaScript compilers | ||
can optimize the logical steps needed to lookup data. We then just [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind) the dimension names, sizes, and data to these "pre-compiled" functions. | ||
@@ -97,0 +97,0 @@ |
@@ -396,7 +396,7 @@ const layoutCache = {}; | ||
function transform({ data, from, to, sizes, useLayoutCache = true }) { | ||
function transform({ data, fill, from, to, sizes, useLayoutCache = true }) { | ||
if (typeof from === "string") from = parse(from, { useLayoutCache }); | ||
if (typeof to === "string") to = parse(to, { useLayoutCache }); | ||
const { data: out_data } = prepareData({ layout: to, sizes }); | ||
const { data: out_data } = prepareData({ fill, layout: to, sizes }); | ||
@@ -403,0 +403,0 @@ let points = [{}]; |
42042