Skip to content

Releases: JG-1202/Js-JSON-GO

v1.2.2

02 Mar 06:49
dbd9850
Compare
Choose a tag to compare

[1.2.2] - 2022-03-02

Changed

  • fixed issue where evaluating checkInSubsetOf causes an error on an undefined path

v1.2.1

21 Feb 18:15
89532fa
Compare
Choose a tag to compare

[1.2.1] - 2022-02-21

Changed

  • JSdoc Json/Map input
  • declaration files Json/Map input

v1.2.0

05 Feb 10:53
8a6a71f
Compare
Choose a tag to compare

[1.2.0] - 2022-02-05

Added

  • placeholders on Map (transform/build/set) that will be resolved from originObject

Changed

  • on undefined destinationObject (Map), let first transform, build, or set determine whether an object/array is desired.

v1.1.3

19 Jan 19:00
df8acb7
Compare
Choose a tag to compare

[1.1.3] - 2022-01-19

Changed

  • parse input on new Json or new Map when not yet parsed
  • does not on default create empty object on new Json with undefined input, but instead let set/build determine whether an object or array is desired

v1.1.2

08 Jan 08:14
915d735
Compare
Choose a tag to compare

[1.1.2] - 2022-01-08

Changed

  • resolved critical issue where query failed if one was expecting an array but found an object or the other way around

v1.1.1

26 Dec 08:49
fc5b4ea
Compare
Choose a tag to compare

[1.1.1] - 2021-12-26

Changed

  • resolved issue where it failed to query non existing element from an array

v1.1.0

26 Dec 08:07
b42b7ae
Compare
Choose a tag to compare

[1.1.0] - 2021-12-26

Added

  • build, buildOne, buildAll handlers: sets function output on specified json path
  • build, buildOne, build added to Json class
  • added build and set to Map client

v1.0.0

15 Dec 20:43
07aa095
Compare
Choose a tag to compare

[1.0.0] - 2021-12-15

Added

  • references: References will be returned on find and can be used on transform
  • limit setting: limits the number of results returned on get, find, getPaths, and limits number of builds on set
  • findOne: Returns only single find result
  • getOne: Gets single value
  • getAllPaths: Returns all paths
  • setOne: Set single value only
  • safeParse: Tries to parse when non-parsed input is provided
  • safeStringify: Tries to stringify when object like input is provided
  • mergeArrays: Merges arrays
  • mergeObjects: Merges objects
  • formatter setting: formats value before it is returned on get, find and on transform

Changed

  • get returns array of values, use getOne to return single value
  • find returns array of results, use findOne to return single result
  • getPaths now accepts limit setting, use getAllPaths to return all paths
  • set will set multiple values, use limit = 1 or setOne to set single value only

Removed

  • defaultGetResponse, returns undefined when no results found
  • defaultGetAllResponse, returns empty array when no results found
  • translate, use transform with limit 1 instead
  • translateAll, use transform without limit instead
  • translateOneToAll, deprecated
  • translateAllToOne, deprecated

v0.4.1

07 Nov 14:19
a425035
Compare
Choose a tag to compare

[0.4.1] - 2021-11-07

Changed

  • fix where falsy results did not show up on resolveAll

v0.4.0

09 Oct 07:51
dd380bc
Compare
Choose a tag to compare

[0.4.0] - 2021-10-09

Added

  • getPath, returns first resolved path from input path
  • getPaths, returns all resolved paths from input path
  • find, returns first elements resolved path and value that matches input path
  • findAll, returns all resolved elements paths and values that match input path
  • exported helpers, these helpers are called from within query and resolveAll to facilitate querying
  • full code coverage on unit tests

Changed

  • load default settings once when one of the exported modules is called
  • name of test folder to tests
  • use babel (default) for codeCoverage instead of v8
  • fix typo to validateResponseAndPassDefault
  • using resolve & resolveAll to facilitate get/getPath/find and getAll/getPaths/findAll
  • removing redundant code in queryElementTransformer, queryTransformer
  • validateElement check on type is string
  • typos from changeLog
  • use function defineConstants on set / setAll to re-use functionality