Skip to content
/ xbrief Public

Misc tools for js development and console test.

License

Notifications You must be signed in to change notification settings

gadge/xbrief

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xbrief

A stringify tool to javascript object

npm version npm quality npm download npm license

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 (c) 2019-present, Haoyang (Vincent) Wang

About

Misc tools for js development and console test.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published