Comparing version 1.4.0 to 1.5.0
@@ -153,1 +153,9 @@ # Features | ||
``` | ||
## Unicode regex | ||
```javascript | ||
var string = 'fooπ©bar'; | ||
var match = string.match(/foo(.)bar/u); | ||
console.log(match[1]); | ||
``` |
@@ -110,3 +110,4 @@ var traverse = require("./traverse"); | ||
restParameters: require("./transformers/rest-parameters"), | ||
forOf: require("./transformers/for-of") | ||
forOf: require("./transformers/for-of"), | ||
unicodeRegex: require("./transformers/unicode-regex") | ||
}; |
@@ -8,2 +8,18 @@ var b = require("ast-types").builders; | ||
exports.TaggedTemplateExpression = function (node) { | ||
var args = []; | ||
var quasi = node.quasi; | ||
var strings = quasi.quasis.map(function (elem) { | ||
return b.literal(elem.value.raw); | ||
}); | ||
args.push(b.arrayExpression(strings)); | ||
_.each(quasi.expressions, function (expr) { | ||
args.push(expr); | ||
}); | ||
return b.callExpression(node.tag, args); | ||
}; | ||
exports.TemplateLiteral = function (node) { | ||
@@ -10,0 +26,0 @@ var nodes = []; |
{ | ||
"name": "6to5", | ||
"description": "Turn ES6 code into vanilla ES5 with source maps and no runtime", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -49,3 +49,4 @@ "homepage": "https://github.com/sebmck/6to5", | ||
"es6-shim": "^0.18.0", | ||
"es6-symbol": "^0.1.1" | ||
"es6-symbol": "^0.1.1", | ||
"regexpu": "^0.2.2" | ||
}, | ||
@@ -52,0 +53,0 @@ "devDependencies": { |
@@ -63,2 +63,3 @@ <p align="center"> | ||
- [Template literals](FEATURES.md#template-literals) | ||
- [Unicode Regex](FEATURES.md#unicode-regex) | ||
@@ -247,2 +248,3 @@ To be implemented: | ||
| Template literals | β | β | β | β | β | β | | ||
| Unicode regex | β | β | | β | β | | | ||
@@ -249,0 +251,0 @@ #### Performance |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58564
33
1161
293
11
+ Addedregexpu@^0.2.2
+ Addedamdefine@1.0.1(transitive)
+ Addedast-types@0.5.7(transitive)
+ Addedcls@0.1.5(transitive)
+ Addedjsesc@0.5.0(transitive)
+ Addedprivate@0.1.8(transitive)
+ Addedrecast@0.8.8(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregexpu@0.2.3(transitive)
+ Addedregjsgen@0.2.0(transitive)
+ Addedregjsparser@0.1.5(transitive)
+ Addedsource-map@0.1.32(transitive)