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