Comparing version 1.0.2 to 1.0.3
@@ -10,4 +10,6 @@ "use strict"; | ||
function jsonpos(json, options) { | ||
return location_1.getLocation(parse_1.getAstByString(json), options); | ||
return location_1.getLocation(typeof json === 'string' | ||
? parse_1.getAstByString(json) | ||
: parse_1.getAstByObject(json), options); | ||
} | ||
exports.jsonpos = jsonpos; |
{ | ||
"name": "jsonpos", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Get the textual position of a property in a JSON text", | ||
@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä", |
[![npm version][npm-image]][npm-url] | ||
[![downloads][downloads-image]][npm-url] | ||
[![build status][build-image]][build-url] | ||
<!-- [![coverage status][coverage-image]][coverage-url] --> | ||
<!-- [![Language grade: JavaScript][lgtm-image]][lgtm-url] --> | ||
[![coverage status][coverage-image]][coverage-url] | ||
[![Language grade: JavaScript][lgtm-image]][lgtm-url] | ||
@@ -7,0 +7,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
9618
113