ishistorypathequal
v1.0.0
Published
判断history的路径是否相同
Downloads
4
Readme
isHistoryPathEqual
判断history的路径是否相同
使用方式
import isHistoryPathEqual from "ishistorypathequal";
let path1 = "/about";
let path2 = "/about";
isHistoryPathEqual(path1,path2);
//true
path2 = "/home";
isHistoryPathEqual(path1,path2);
//false
参数
/**
*@desc object是history中的location对象
*@param {string|object} path1
*@param {string|object} path2
*@return boolean
*/
isHistoryPathEqual(path1,path2);