mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
- minor changes in param names to align with documented usage (input/prop/etc) - defaults documentation added - add public, non-documented `pad` parameter - remove TS vresion pragma which is now no-op (DT defaults to 2.8 or newer by default) - maintainer added https://github.com/yeoman/stringify-object/releases/tag/v3.3.0 Thanks!
36 lines
583 B
TypeScript
36 lines
583 B
TypeScript
import stringifyObject = require('stringify-object');
|
|
|
|
stringifyObject({ a: 1, b: 2, c: 3 });
|
|
|
|
stringifyObject('abc', {
|
|
indent: ' '
|
|
});
|
|
|
|
stringifyObject('123', {
|
|
indent: ' '
|
|
});
|
|
|
|
stringifyObject(123, {
|
|
indent: ' ',
|
|
singleQuotes: false
|
|
});
|
|
|
|
stringifyObject([1, 2, 3], {
|
|
indent: ' ',
|
|
singleQuotes: false,
|
|
inlineCharacterLimit: 12
|
|
});
|
|
|
|
stringifyObject([1, 2, 3], {
|
|
filter: (o, prop) => prop !== '_hidden_'
|
|
});
|
|
|
|
stringifyObject([1, 2, 3], {
|
|
transform: (val, key, value) => value
|
|
});
|
|
|
|
/** pad */
|
|
stringifyObject([1, 2, 3], {
|
|
indent: ' ',
|
|
}, ' ');
|