Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hzab/data-model

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hzab/data-model - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

src/hooks.js

2

package.json
{
"name": "@hzab/data-model",
"version": "0.1.2",
"version": "0.2.0",
"description": "data model",

@@ -5,0 +5,0 @@ "main": "src",

@@ -12,3 +12,12 @@ # @hzab/data-model

```jsx
import DataModel from "@hzab/data-model";
import DataModel, {
// 设置 token 到 localStorage 及 cookie,可以设置 opt.hasCookie(setToken(token, { hasCookie: false })) 关闭设置 token 到 cookie 上
setToken,
// 从 cookie 或 localStorage 获取 token
getToken,
// 设置默认兜底的错误信息
setDefaultErrMsg,
// 设置 DataModel 中默认的 axios
setDefaultAxios,
} from "@hzab/data-model";

@@ -15,0 +24,0 @@ const listDM = new DataModel({

@@ -6,2 +6,3 @@ import axios from "./axios";

export * from "./data-model";
export * from "./hooks";

@@ -8,0 +9,0 @@ export { axios, DataModel };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc