0.1.1 • Published 5 months ago

@ara-web/p-hintjens v0.1.1

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
5 months ago

P-Hintjens

This package is named in Pieter Hintjens honor.

Another name of the package that describes its purpose is Typescript enhancement. Which simply adds additional functions that simplifies your work flow.

Useful scripts you can take from this package:

  • 🤖 Traits adds additional methods that works with the Typescript data types. List of traits and example utility they could provide:
    • Array isEqualArray makes sure two arrays have the same element data.
    • Enum enumValues and enumKeys returns list of values or keys from the defined enum.
    • Object deepCopy creates a new copy of the object by value.
    • String capitalizeFirstLetter simply makes the first letter of the string uppercase.
  • 📝 Ara Link adds various types of links between objects.
    • Ara Link A generic Link that could link to any resource, not only text value.
    • Module Link either a file url or a Purl. Used to create module IDs.
  • 🛠️ Debug Much better version of console.log that puts intends as the code flow enters into a new function.
  • 🔌 Interfaces various interfaces to cast object into this interface.
    • get-text cast object into an interface with getText() => string method.
  • 🔒 Result return Result<ReturnType> from function, and if the result is error, don't throw exceptions.

The decorators

The staticImplements allows creating interfaces with the static methods.

URL: @ara-web/p-hintjens?id=ObjectTraits.staticImplements#traits/traits/object-traits.

Roadmap

  • Add arbitrary amount of data in the Debug.log();
0.1.1

5 months ago

0.1.0

5 months ago

0.0.1

5 months ago