Commit Graph

19 Commits

Author SHA1 Message Date
Jukka Kurkela
a4114e84d9
parsing: support dot(s) in object keys (#10517) 2022-07-26 08:30:52 -04:00
Evert Timberg
e29ba78cd1
Allow the events option to be changed at runtime (#8928) 2021-04-17 14:08:36 -04:00
Jukka Kurkela
ddfbcf777a
Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
Jukka Kurkela
183637b87f
Add tests and clean up resolveObjectKey helper (#8028)
* Add tests and clean up resolveObjectKey helper

* Change the optimized path to comply with thests
2020-11-10 17:34:31 +02:00
Evert Timberg
ac68593873
Block incorrect keys in merge code to prevent prototype pollution (#7919)
* Port fix from v2

* Port test

* Test both merge and mergeIf
2020-10-18 21:16:20 +03:00
Jukka Kurkela
d561486b4e
Revert "Preserve object prototypes when cloning (#7381)" (#7727)
This reverts commit 51be344717.
2020-08-24 08:15:56 -04:00
Evert Timberg
d315934513
Radial scale scriptable options (#7471)
Scriptable radialLinear options
2020-06-11 08:49:54 -04:00
Jukka Kurkela
8e7bde25c4
Remove data checks and always re-parse data (#7458)
* Remove data checks and always re-parse data
* Fix removed helper namespace
2020-06-08 17:49:55 -04:00
Jukka Kurkela
f472a3f9a7
Remove proposal and obsolete features (#7425) 2020-05-26 19:16:23 -04:00
Jukka Kurkela
51be344717
Preserve object prototypes when cloning (#7381) 2020-05-20 17:40:42 -04:00
Jukka Kurkela
7c1fb37c61
Babel @kurkle/color for IE support (#7099)
Babel @kurkle/color for IE support
2020-02-14 12:29:33 -05:00
Ben McCann
a3392e0e59 Remove index and datasetIndex from Element (#6688)
Remove `index` and `datasetIndex` properties from elements.
2019-11-10 07:52:12 -05:00
Jukka Kurkela
c8ce3d2018 Add support for typed arrays (#5905) 2018-12-18 14:49:39 +01:00
Evert Timberg
b3b5c7de4f Ensure that when we check typeof x == 'number' we also check instanceof Number (#5752) 2018-10-22 09:52:05 +02:00
Simon Brunel
26c1936dee Move extend and inherits helpers in helpers.core.js (#4878)
Fix Rollup issue caused by early access of the `extend` and `inherits` helpers not yet part of the `helpers/index` import. Also added (basic) unit tests for whose methods.
2017-10-24 19:11:40 +02:00
Simon Brunel
4c763bff44 Enforce spaces around infix/unary words operators (#4547)
Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations.

http://eslint.org/docs/rules/space-infix-ops
http://eslint.org/docs/rules/space-unary-ops
2017-07-22 14:13:09 +02:00
Simon Brunel
225bfd36f3 Rewrite the clone and merge helpers (#4422)
The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multiple sources are deep copied. Note that the target (first argument) is not cloned and will be modified after calling `merge(target, sources)`. Add a `mergeIf` helper which merge the source properties only if they do not exist in the target object.
2017-07-01 14:51:38 +02:00
Simon Brunel
5d95280d7b Change valueAtIndexOrDefault behavior (#4423)
For consistency with `valueOrDefault`, `valueAtIndexOrDefault` now returns null if `value` (expected array) is null. Also get rid of the superfluous `get` prefix in `getValueOrDefault` and `getValueAtIndexOrDefault`.
2017-06-25 10:54:37 +02:00
Simon Brunel
5196e05062 Cleanup and reorganize core and canvas helpers
Move some of the "core" and "canvas" utils in `helpers.core.js` and `helpers.canvas.js` and introduce the new `isNullOrUndef` and `isObject` helpers. Deprecate `indexOf` and rename `drawRoundedRectangle` to `roundedRect` which now creates a simple `rect` path if radius is 0. Write missing unit tests for the moved helpers.
2017-06-24 13:28:52 -04:00