Preparing search index...

    Function getPlanet

    • Get a single planet with its translated properties for a specified language.

      Parameters

      • planetKey: Planets

        The key corresponding to the desired planet.

      • Optionallanguage: "en" | "es" | "ca" = 'en'

        The language code to use for translations. Defaults to 'en'.

      Returns null | Planet

      An object with translated values based on the specified language, or null if the planet key is invalid.

      import { getPlanet, PLANETS } from 'western-signs';

      // Retrieve information about Mars in English
      const mars = getPlanet(PLANETS.MARS);
      console.log(mars);
      // Output:
      // {
      // name: 'Mars',
      // glyph: '♂',
      // type: 'Personal'
      // }