包详细信息

xbrief

hoyeungw196MIT1.0.5

A light and simple console debug tool.

test, console, debug, print

自述文件

xbrief

npm version npm download monthly npm download total npm dependents npm license pp install size github commit last github commit total

A stringify tool to javascript object

Features

  • A substitute for JSON.stringify
  • ES2015 syntax

Install

$ npm install xbrief

Usage

import { deco } from 'xbrief'

const objects = {
  boolean: true,
  string: 'Shakespeare',
  number: 128,
  null: null,
  undefined: undefined,
  one_row_matrix: [ [1, 1, 2, 3, 5, 8, 13, 21] ],
  simple_set: new Set([1, 1, 1, 2, 2, 3, 3, 3]),
  simple_matrix: Array.from({ length: 3 }, (_, x) =>
    Array.from({ length: 8 }, (_, y) => x + y + 1)),
  simple_map: new Map([['Lagos', 861], ['Dhaka', 8906], ['Lima', 9174], ['Ankara', 5271], ['Nagpur', 2405]]),
  simple_lambda: (x) => `${x}`,
}

console.log(deco(objects))

License

MIT

Copyright (y) 2019-present, Haoyang (Vincent) Wang