Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastian McKenzie
02cb397873 v5.2.2 2015-05-01 00:43:39 +01:00
Sebastian McKenzie
d9169a87ad allow util.arrayify to take arbitrary types and coerce it into an array - #1398 2015-05-01 00:41:47 +01:00
Sebastian McKenzie
f3b6f2fc61 5.2.1 2015-05-01 00:41:24 +01:00
6 changed files with 11 additions and 9 deletions

View File

@@ -13,6 +13,11 @@ _Note: Gaps between patch versions are faulty/broken releases._
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
## 5.2.2
* **Internal**
* Allow `util.arrayify` to take arbitrary types and coerce it into an array.
## 5.2.1
* **Bug Fix**

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.2.1",
"version": "5.2.2",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",

View File

@@ -1,13 +1,13 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.2.0",
"version": "5.2.1",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.2.0",
"babel-core": "^5.2.1",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"convert-source-map": "^1.1.0",

View File

@@ -1,7 +1,7 @@
{
"name": "babel-runtime",
"description": "babel selfContained runtime",
"version": "5.2.0",
"version": "5.2.1",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {

View File

@@ -88,7 +88,7 @@ export function arrayify(val: any, mapFn?: Function): Array {
return val;
}
throw new TypeError("illegal type for arrayify");
return [val];
}
export function booleanify(val: any): boolean {

View File

@@ -72,10 +72,7 @@ suite("util", function () {
assert.deepEqual(util.arrayify("foo"), ["foo"]);
assert.deepEqual(util.arrayify("foo,bar"), ["foo", "bar"]);
assert.deepEqual(util.arrayify(["foo", "bar"]), ["foo", "bar"]);
assert.throws(function () {
util.arrayify({});
}, /illegal type for arrayify/);
assert.deepEqual(util.arrayify({ foo: "bar" }), [{ foo: "bar" }]);
});
test("regexify", function () {