From fa2a82ef75b2894e0703488a8ec7cc7d0910a0b9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 17 May 2013 15:04:10 -0400 Subject: [PATCH] updated README with stringifyRange --- README.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40eba02..76d2f27 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,40 @@ A solution to Parses a range string into an array of semver objects -`>= 1.1.7 < 2.0.0 || 1.1.3'` becomes +`>= 1.1.7 < 2.0.0 || 1.1.3` becomes + + [ + { + "semver": ">= v1.1.7" + , "operator": ">=" + , "major": 1 + , "minor": 1 + , "patch": 7 + } + , { + "semver": "< v2.0.0" + , "operator": "<" + , "major": 2 + , "minor": 0 + , "patch": 0 + } + , { + "operator": "||" + } + , { + "semver": "v1.1.3" + , "operator": "=" + , "major": 1 + , "minor": 1 + , "patch": 3 + } + + ] + +### stringifyRange(rangeString) + +Creates a range string such as `>= 1.1.7 < 2.0.0 || 1.1.3` +from an array of semver objects (and operators) such as [ {