Skip to content

Commit

Permalink
typeof transpilation quickfix
Browse files Browse the repository at this point in the history
kroitor committed Nov 5, 2017
1 parent 38856c7 commit ce6925e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transpile.js
Original file line number Diff line number Diff line change
@@ -187,8 +187,8 @@ const python2Regexes = [
const phpRegexes = [
[ /typeof\s+([^\s\[]+)(?:\s|\[(.+?)\])\s+\=\=\s+\'undefined\'/g, '$1[$2] == null' ],
[ /typeof\s+([^\s\[]+)(?:\s|\[(.+?)\])\s+\!\=\s+\'undefined\'/g, '$1[$2] != null' ],
[ /typeof\s+([^\s]+)\s+\=\=\s+\'undefined\'/, '$1 === null' ],
[ /typeof\s+([^\s]+)\s+\!\=\s+\'undefined\'/, '$1 !== null' ],
[ /typeof\s+([^\s]+)\s+\=\=\s+\'undefined\'/g, '$1 === null' ],
[ /typeof\s+([^\s]+)\s+\!\=\s+\'undefined\'/g, '$1 !== null' ],
[ /typeof\s+([^\s\[]+)(?:\s|\[(.+?)\])\s+\=\=\s+\'string\'/g, "gettype ($1[$2]) == 'string'" ],
[ /typeof\s+([^\s\[]+)(?:\s|\[(.+?)\])\s+\!\=\s+\'string\'/g, "gettype ($1[$2]) != 'string'" ],
[ /typeof\s+([^\s]+)\s+\=\=\s+\'string\'/g, "gettype ($1) == 'string'" ],

0 comments on commit ce6925e

Please sign in to comment.