0.0.4 • Published 4 years ago

@wisetc/utils-adapter v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Utils-Adapter

不同接口适配器工具库.

快速开始

安装依赖

$ npm i -S @wisetc/utils-adapter

基本使用

import { diff } from '@wisetc/utils-adapter';

console.log(
  diff.diffObjectList(
    [
      {
        id: 'id0',
        name: '挂式空调',
        typeId: '23b447b19fa446b1b89c0631b7a5225b',
        brandName: '无',
        modelName: '常规',
        sizeName: 'KFR-35GW/06TAA13T',
        remarks: null,
        count: 2,
      },
      {
        id: 'id1',
        name: '床',
        typeId: '7051b0fcd25e47cc97c8e2c56e5213e4',
        brandName: '无',
        modelName: '常规',
        sizeName: '1500*2000*1000',
        remarks: null,
        count: 1,
      },
    ],
    [
      {
        id: 'id0',
        name: '挂式空调',
        typeId: '23b447b19fa446b1b89c0631b7a5225b',
        brandName: '无',
        modelName: '常规',
        sizeName: 'KFR-35GW/06TAA13T',
        remarks: null,
        count: 1,
      },
      {
        id: 'id1',
        name: '床',
        typeId: '7051b0fcd25e47cc97c8e2c56e5213e4',
        brandName: '无',
        modelName: '常规',
        sizeName: '1500*2000*1000',
        remarks: null,
        count: 3,
      },
    ]
  )
);

方法列表

  • diff
    • diffObjectList
    • flattenArray
  • blob
    • blob2Json