@dmsi/core
TypeScript icon, indicating that this package has built-in type declarations

8.0.0 • Public • Published

DMSi Core

Utilities for use in DMSi applications

npm

Core DMSi JavaScript utility functions

Name Description
browser Browser provides information regarding the state of the user's browser, including HTML/CSS features available, whether the browser is a mobile one, along with other lower-level browser information. Browser also offers a method to get the current orientation of the browser.
cookies Abstraction of document.cookie that allows for easier access and modification of cookies.
decimal Export methods to create decimal numbers in varying user-readable formats.
hash Generates a hexidecimal string from a string. Useful for generating a key from a complex JS object for storage purposes.
keyEvents Executes a callback if the given key was pressed.
Logger Sends log messages to a websocket server that follow DMSi's standards for log levels.
storage Abstractions of window.localStorage and window.sessionStorage that allow for easier access and modification of browser storage. All values will be stored using a hardcoded prefix (dmsi:) to ensure uniqueness.
timezone Exports methods designed to programmatically apply timezones to pre-existing dates, be they strings or Moment dates.

Useful (Small) Libraries

  • dot-prop: get, set, or delete a property from a nested object using a dot path
  • deepmerge: merges the enumerable properties of two or more objects deeply
  • klona: a tiny and fast utility to "deep clone" Objects, Arrays, Dates, RegExps, and more
  • pipr: a tiny function for piping the results of one function to the next

Versioning

DMSi Constants conforms to the semver spec for versioning. The library is versioned separately from other @dmsi packages. Check out the CHANGELOG to see what's changed.

Local Development

For most development purposes, symlinking @dmsi/core with a consuming package should be sufficient. However in certain cases the developer may have trouble symlinking to packages with competing dependency versions. In this case you may run yarn publish:test, which will publish a tc version for local development. The package must be updated to a major/minor/patch/rc version before being merged into develop.

/@dmsi/core/

    Package Sidebar

    Install

    npm i @dmsi/core

    Weekly Downloads

    4

    Version

    8.0.0

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    27.8 kB

    Total Files

    22

    Last publish

    Collaborators

    • tprettyman
    • rnimrod
    • brent-heavican
    • rerskine
    • msuiter
    • mada1113
    • jquerijero
    • kolson
    • dreadman3716