Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenPioneer committed Oct 8, 2016
2 parents deca49e + fdecaa2 commit 77047b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var autoParse = require('auto-parse')
_.mixin({'autoParse':autoParse})
// Require, Delcare & Call
var autoParse = require('auto-parse')
console.log(autoParse('Green Pioneer')) // Prints out as a String
console.log(autoParse('Green Pioneer')) // Parses as a String
```

Check the Usage examples out below
Expand All @@ -49,21 +49,24 @@ try to find a way to parse it.
```js
var autoParse = require('auto-parse')

autoParse('Green Pioneer') // Prints out as a String
autoParse('26')// Prints out as a Number
autoParse('TrUe ')// Prints out as a Boolean
autoParse(['80', '92', '23', 'TruE', false]) // Prints out as a Array
autoParse('Green Pioneer') // Parses as a String
autoParse('26')// Parses as a Number
autoParse('TrUe ')// Parses as a Boolean
autoParse(['80', '92', '23', 'TruE', false]) // Parses as a Array
autoParse({
name: 'jason', // Prints out as a String
age: '50',// Prints out as a Number
admin: 'true',// Prints out as a Boolean
grade: ['80', '90', '100']// Prints out as a Array full of Numbers
}) // Prints out as a Object
name: 'jason', // Parses as a String
age: '50',// Parses as a Number
admin: 'true',// Parses as a Boolean
grade: ['80', '90', '100']// Parses as a Array full of Numbers
}) // Parses as a Object
autoParse(function () {
return '9'
})// Prints out as a Number
autoParse(' Undefined ')// Prints out as a undefined
autoParse(' Null ')// Prints out as a null
})// Parses as a Number
autoParse(' Undefined ')// Parses as a undefined
autoParse(' Null ')// Parses as a null
autoParse('{}') // Parses as a json
autoParse('["42"]') // Parses as a json
autoParse('NaN') // Parses as a NaN
```

[Check out JS Fiddle Example](https://jsfiddle.net/greenpioneer/4y744xyd/)
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "auto-parse",
"version": "1.0.0",
"description": "auto-parse any value you happen to send in",
"version": "1.1.0",
"description": "auto-parse any value you happen to send in (String, Number, Boolean,Array, Object, Function, undefined and null). You send it we will try to find a way to parse it.",
"main": "index.js",
"dependencies": {
"lodash": "^4.16.3"
Expand All @@ -28,6 +28,10 @@
"name": "greenpioneersolutions",
"email": "green@greenpioneersolutions.com",
"web": "https://github.com/greenpioneersolutions"
},{
"name": "Ionică Bizău",
"email": "bizauionica@gmail.com",
"web": "http://ionicabizau.net"
}
],
"maintainers": [
Expand Down

0 comments on commit 77047b7

Please sign in to comment.