ships.Function.stringifySlef - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / stringifySlef

Function: stringifySlef()

stringifySlef(slef, options?): string

Defined in: src/ships/slef.ts:657

Serialise a SLEF export to its JSON string.

Parameters

slef

Slef

The entries, as toSlef returns them.

options?

SlefStringifyOptions = {}

Formatting. Compact by default.

Returns

string

The JSON text.

Example

import { stringifySlef } from '@elite-dangerous-almanac/core/ships/slef';
import type { Slef } from '@elite-dangerous-almanac/core/ships/slef';

declare const slef: Slef;

stringifySlef(slef, { indent: 2 }); // human-readable, for writing to a file
⚠️ **GitHub.com Fallback** ⚠️