1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createString = void 0;
|
7 |
|
8 | var _factory = require("../utils/factory");
|
9 |
|
10 | var _collection = require("../utils/collection");
|
11 |
|
12 | var _number = require("../utils/number");
|
13 |
|
14 | var name = 'string';
|
15 | var dependencies = ['typed'];
|
16 | var createString = (0, _factory.factory)(name, dependencies, function (_ref) {
|
17 | var typed = _ref.typed;
|
18 |
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | return typed(name, {
|
45 | '': function _() {
|
46 | return '';
|
47 | },
|
48 | number: _number.format,
|
49 | "null": function _null(x) {
|
50 | return 'null';
|
51 | },
|
52 | "boolean": function boolean(x) {
|
53 | return x + '';
|
54 | },
|
55 | string: function string(x) {
|
56 | return x;
|
57 | },
|
58 | 'Array | Matrix': function ArrayMatrix(x) {
|
59 | return (0, _collection.deepMap)(x, this);
|
60 | },
|
61 | any: function any(x) {
|
62 | return String(x);
|
63 | }
|
64 | });
|
65 | });
|
66 | exports.createString = createString; |
\ | No newline at end of file |