0.0.8 • Published 2 years ago

@shanzhai/stringify-json-output v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@shanzhai/stringify-json-output Continuous Integration License FOSSA Status Renovate enabled npm npm type definitions

A Shanzhai output which "stringifies" a value before passing it to an output.

Usage

Give an instance of StringifyJsonOutput to a Step as an output and it will convert the value it is given into a string of JSON before passing it to its nested Output.

For example, the following examples are equivalent:

new CopyStep(
  `Example`,
  new ConstantInput([1, 2, 3]),
  new StringifyJsonOutput(new ExampleOutput())
);
new CopyStep(
  `Example`,
  new ConstantInput(`[1,2,3]`),
  new ExampleOutput()
);

Note that this does not directly use JSON.stringify; it has the following differences:

  • Object key order is always sorted, ascending.
  • Object properties with undefined values are omitted from the string of JSON.

Dependencies

This package has no runtime dependencies.

Peer Dependencies

This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).

License

FOSSA Status

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.6

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago