mol_time_all 1.1.837 → 1.1.838

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/node.test.js CHANGED
@@ -202,6 +202,105 @@ var $;
202
202
  ;
203
203
  "use strict";
204
204
  var $;
205
+ (function ($) {
206
+ $['devtoolsFormatters'] ||= [];
207
+ function $mol_dev_format_register(config) {
208
+ $['devtoolsFormatters'].push(config);
209
+ }
210
+ $.$mol_dev_format_register = $mol_dev_format_register;
211
+ $.$mol_dev_format_head = Symbol('$mol_dev_format_head');
212
+ $.$mol_dev_format_body = Symbol('$mol_dev_format_body');
213
+ $mol_dev_format_register({
214
+ header: (val, config = false) => {
215
+ if (config)
216
+ return null;
217
+ if (!val)
218
+ return null;
219
+ if ($.$mol_dev_format_head in val) {
220
+ try {
221
+ return val[$.$mol_dev_format_head]();
222
+ }
223
+ catch (error) {
224
+ return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
225
+ }
226
+ }
227
+ if (typeof val === 'function') {
228
+ return $mol_dev_format_native(val);
229
+ }
230
+ return null;
231
+ },
232
+ hasBody: val => val[$.$mol_dev_format_body],
233
+ body: val => val[$.$mol_dev_format_body](),
234
+ });
235
+ function $mol_dev_format_native(obj) {
236
+ if (typeof obj === 'undefined')
237
+ return $.$mol_dev_format_shade('undefined');
238
+ return [
239
+ 'object',
240
+ {
241
+ object: obj,
242
+ config: true,
243
+ },
244
+ ];
245
+ }
246
+ $.$mol_dev_format_native = $mol_dev_format_native;
247
+ function $mol_dev_format_auto(obj) {
248
+ if (obj == null)
249
+ return $.$mol_dev_format_shade(String(obj));
250
+ return [
251
+ 'object',
252
+ {
253
+ object: obj,
254
+ config: false,
255
+ },
256
+ ];
257
+ }
258
+ $.$mol_dev_format_auto = $mol_dev_format_auto;
259
+ function $mol_dev_format_element(element, style, ...content) {
260
+ const styles = [];
261
+ for (let key in style)
262
+ styles.push(`${key} : ${style[key]}`);
263
+ return [
264
+ element,
265
+ {
266
+ style: styles.join(' ; '),
267
+ },
268
+ ...content,
269
+ ];
270
+ }
271
+ $.$mol_dev_format_element = $mol_dev_format_element;
272
+ function $mol_dev_format_span(style, ...content) {
273
+ return $mol_dev_format_element('span', {
274
+ ...style,
275
+ }, ...content);
276
+ }
277
+ $.$mol_dev_format_span = $mol_dev_format_span;
278
+ $.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
279
+ $.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
280
+ $.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
281
+ $.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
282
+ $.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
283
+ $.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
284
+ $.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
285
+ 'color': 'magenta',
286
+ });
287
+ $.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
288
+ 'font-weight': 'bold',
289
+ });
290
+ $.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
291
+ 'color': 'green',
292
+ });
293
+ $.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
294
+ 'color': 'gray',
295
+ });
296
+ $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
297
+ 'margin-left': '13px'
298
+ });
299
+ })($ || ($ = {}));
300
+ //mol/dev/format/format.ts
301
+ ;
302
+ "use strict";
303
+ var $;
205
304
  (function ($) {
206
305
  let $mol_time_moment_weekdays;
207
306
  (function ($mol_time_moment_weekdays) {
@@ -362,6 +461,9 @@ var $;
362
461
  [Symbol.toPrimitive](mode) {
363
462
  return mode === 'number' ? this.valueOf() : this.toString();
364
463
  }
464
+ [$mol_dev_format_head]() {
465
+ return $mol_dev_format_span({}, $mol_dev_format_native(this), ' ', $mol_dev_format_accent(this.toString('YYYY-MM-DD hh:mm:ss.sss Z')));
466
+ }
365
467
  static patterns = {
366
468
  'YYYY': (moment) => {
367
469
  if (moment.year == null)