1 | import {color} from "d3-color";
|
2 | import rgb from "./rgb";
|
3 | import array from "./array";
|
4 | import number from "./number";
|
5 | import object from "./object";
|
6 | import string from "./string";
|
7 |
|
8 | export default [
|
9 | function(a, b) {
|
10 | var t = typeof b, c;
|
11 | return (t === "string" ? ((c = color(b)) ? (b = c, rgb) : string)
|
12 | : b instanceof color ? rgb
|
13 | : Array.isArray(b) ? array
|
14 | : t === "object" && isNaN(b) ? object
|
15 | : number)(a, b);
|
16 | }
|
17 | ];
|