hastscript
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -5,2 +5,9 @@ <!--remark setext--> | ||
2.0.0 / 2016-04-12 | ||
================== | ||
* Remove `0` as a default for invalid numeric values ([`663545c`](https://github.com/wooorm/hastscript/commit/663545c)) | ||
* Add `menu` to list of button-type exceptions ([`eb92e9f`](https://github.com/wooorm/hastscript/commit/eb92e9f)) | ||
* Remove casting of invalid values ([`468c3c3`](https://github.com/wooorm/hastscript/commit/468c3c3)) | ||
1.0.1 / 2016-02-25 | ||
@@ -7,0 +14,0 @@ ================== |
15
index.js
@@ -50,7 +50,7 @@ /** | ||
if (info.boolean) { | ||
result = true; | ||
} else if (info.numeric || info.positiveNumeric) { | ||
result = Number(result); | ||
} else if (info.overloadedBoolean) { | ||
if (info.numeric || info.positiveNumeric) { | ||
if (!isNaN(result) && result !== '') { | ||
result = Number(result); | ||
} | ||
} else if (info.boolean || info.overloadedBoolean) { | ||
/* | ||
@@ -201,3 +201,6 @@ * Accept `boolean` and `string`. | ||
if (tagName === 'button') { | ||
return type !== 'submit' && type !== 'reset' && type !== 'button'; | ||
return type !== 'menu' && | ||
type !== 'submit' && | ||
type !== 'reset' && | ||
type !== 'button'; | ||
} | ||
@@ -204,0 +207,0 @@ |
{ | ||
"name": "hastscript", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Hyperscript compatible DSL for creating virtual HAST trees", | ||
@@ -32,4 +32,4 @@ "license": "MIT", | ||
"css-declarations": "^1.0.0", | ||
"hast-util-parse-selector": "^1.0.0", | ||
"property-information": "^2.0.0", | ||
"hast-util-parse-selector": "^2.0.0", | ||
"property-information": "^3.0.0", | ||
"space-separated-tokens": "^1.0.0" | ||
@@ -36,0 +36,0 @@ }, |
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
12306
207
+ Addedhast-util-parse-selector@2.2.5(transitive)
+ Addedproperty-information@3.2.0(transitive)
- Removedhast-util-parse-selector@1.0.0(transitive)
- Removedproperty-information@2.0.0(transitive)
Updatedproperty-information@^3.0.0