@std-uritemplate/std-uritemplate
Advanced tools
Comparing version 0.0.31 to 0.0.32
@@ -361,2 +361,5 @@ "use strict"; | ||
} | ||
else if (value instanceof Date) { | ||
value = value.toISOString().split('.')[0] + "Z"; | ||
} | ||
const substType = StdUriTemplate.getSubstitutionType(value, col); | ||
@@ -363,0 +366,0 @@ if (StdUriTemplate.isEmpty(substType, value)) { |
{ | ||
"name": "@std-uritemplate/std-uritemplate", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "std-uritemplate implementation for TS/JS", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -24,3 +24,3 @@ # std-uritemplate | ||
| Typescript | ✅ | ✅ | ✅ | | ||
| Go | ✅ | ❌ | ✅ | | ||
| Go | ✅ | ✅ | ✅ | | ||
| C# | ✅ | ✅ | ✅ | | ||
@@ -218,2 +218,3 @@ | Ruby | ✅ | ❌ | ✅ | | ||
- one implementation per ecosystem/runtime (e.g. 1 implementation in Java and no Kotlin/Scala/Closure, 1 in TS that will serve JS as well etc.) | ||
- substitutions will be performed for primitive types and date-time | ||
@@ -220,0 +221,0 @@ ## API |
@@ -387,2 +387,4 @@ type Substitutions = { [key: string]: any }; | ||
value = value.toString(); | ||
} else if (value instanceof Date) { | ||
value = value.toISOString().split('.')[0] + "Z"; | ||
} | ||
@@ -389,0 +391,0 @@ |
@@ -11,2 +11,9 @@ const fs = require('fs'); | ||
if (data["nativedate"] !== undefined) { | ||
data["nativedate"] = new Date(data["nativedate"]); | ||
} | ||
if (data["nativedatetwo"] !== undefined) { | ||
data["nativedatetwo"] = new Date(data["nativedatetwo"]); | ||
} | ||
const template = fs.readFileSync(templateFile, 'utf8').trim(); | ||
@@ -13,0 +20,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
51589
1040
254