Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type coercion option #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add type coercion option #72

wants to merge 3 commits into from

Conversation

sgoumaz
Copy link

@sgoumaz sgoumaz commented Apr 29, 2013

New environment option "typeCoercionFns" accepting an object with functions for coercing values to expected types (typically converting strings to booleans or numbers). The functions' names must match their corresponding type (e.g. "boolean" or "number").

See "Type Coercion Option" test at the end of tests/tests3.js for example usage.

This actually implements #5.

@sgoumaz
Copy link
Author

sgoumaz commented Apr 29, 2013

Note: please use ?w=1 in the URL when checking out the diff to ignore whitespace differences (some lines ending with spaces have been trimmed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant