weex-styler
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -452,3 +452,7 @@ var util = require('./util') | ||
if (typeof validator === 'function') { | ||
result = validator(value) | ||
if (typeof value !== 'function') { | ||
result = validator(value) | ||
} else { | ||
result = {value: value} | ||
} | ||
if (result.reason) { | ||
@@ -460,3 +464,3 @@ log = {reason: result.reason(name, value, result.value)} | ||
// ensure number type, no `px` | ||
if (value.match(/^[-+]?[0-9]*\.?[0-9]+(px)?$/)) { | ||
if (typeof value !== 'function' && value.match(/^[-+]?[0-9]*\.?[0-9]+(px)?$/)) { | ||
value = parseFloat(value) | ||
@@ -463,0 +467,0 @@ } |
{ | ||
"name": "weex-styler", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Weex <style> transformer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Weex `<style>` Transformer | ||
[![NPM version][npm-image]][npm-url] | ||
[![Build status][circle-image]][circle-url] | ||
[![Downloads][downloads-image]][downloads-url] | ||
[npm-image]: https://img.shields.io/npm/v/weex-styler.svg?style=flat-square | ||
[npm-url]: https://npmjs.org/package/weex-styler | ||
[circle-image]: https://circleci.com/gh/alibaba/weex_toolchain.svg?style=svg | ||
[circle-url]: https://circleci.com/gh/alibaba/weex_toolchain/tree/master | ||
[downloads-image]: https://img.shields.io/npm/dm/weex-styler.svg?style=flat-square | ||
[downloads-url]: https://npmjs.org/package/weex-styler | ||
## Features | ||
@@ -4,0 +15,0 @@ |
45479
1017
125