daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function split (thing) {
  2.     if (typeof thing === 'string') {
  3.       return thing.split('/')
  4.     } else if (thing.fast_slash) {
  5.       return ''
  6.     } else {
  7.       var match = thing.toString()
  8.         .replace('\\/?', '')
  9.         .replace('(?=\\/|$)', '$')
  10.         .match(/^\/\^((?:\\[.*+?^${}()|[\]\\\/]|[^.*+?^${}()|[\]\\\/])*)\$\//)
  11.       return match
  12.         ? match[1].replace(/\\(.)/g, '$1').split('/')
  13.         : '<complex:' + thing.toString() + '>'
  14.     }
  15.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top