utilities.js 289 B

12345678910111213
  1. export const makeRenderKey = (tags) => {
  2. let key = ''
  3. for(let i = 0; i < tags.length; i++) if(tags[i].boolean) key += tags[i].tag
  4. return key
  5. }
  6. export const isKey = key => {
  7. return (/^[a-f0-9]$/).test(key)
  8. }
  9. export const isHash = hash => {
  10. return (/^[a-f0-9]{32}$/).test(hash)
  11. }