json-short
TypeScript icon, indicating that this package has built-in type declarations

1.0.2-beta • Public • Published

Роутер для ботов

Импортирование

const { short_json, deshort_json } = requier('json-short'); //es5
  or
import { short_json, deshort_json } from 'json-short'; //es6

Использование Сжать

short_json({
  id: 10,
  text: "string"
})
return {
  data: {
    1: 10,
    2: "string"
  },
  short_json: {
    id: 1,
    text: 2
  }
}

Вернуть обратно

deshort_json({
  data: {
    1: 10,
    2: "string"
  },
  short_json: {
    id: 1,
    text: 2
  }
})
return {
  {
    id: 10,
    text: "string"
  }
}

Тесты

Framework Version (short) ops/sec (deshort) ops/sec size
compress-json 2.1.2 919,286 26,018 20,6 КБ
short-json 1.0.0-beta 11,218,886 21,334,942 20,4 КБ
-
json - - - 32,4 КБ

Package Sidebar

Install

npm i json-short

Weekly Downloads

1

Version

1.0.2-beta

License

MIT

Unpacked Size

6.92 kB

Total Files

6

Last publish

Collaborators

  • xuserz