1.0.24 • Published 6 years ago
hash-parse v1.0.24
hash-parse
hash解析与设置
npm install hash-parse
import hash from 'hash-parse';
hash.parse('https://github.com/#name=hash'); // {name: 'hash'}
// 如果当前URL=https://github.com
hash.set({ name: 'hash', version: '1.0.0' }) // https://github.com/#name=hash&version=1.0.0
// 删除hash中的参数name
hash.del('name') // https://github.com/#version=1.0.0
// 删除多个参数
hash.del(['name','version']) // https://github.com/