Skip to content

This is a typescript npm package for creating timestamp in readable format.

License

Notifications You must be signed in to change notification settings

jadogeri/GetTimeStampTS

Repository files navigation

GET TIMESTAMP TS

Version: 1.0.0 Date: June 7, 2025


Description

This is a typescript npm package for creating timestamp in readable format.

Authors

@jadogeri

Repository

https://github.com/jadogeri/GetTimeStampTS.git

Registory

https://www.npmjs.com/package/@josephadogeridev/get-timestamp-ts

Screenshots

Screenshot 1 screenshot 2

Table of Contents

  • 6. References
    • 1. Introduction

      1.1 Purpose

      This document outlines the package architecture, components, and design considerations for Get TimeStamp TS package. The goal is to create a timestamp in readable format.

      1.2 Scope

      This package will allow users to:

      • Create timestamp as string.
      • Resolve undefined and null values as inputs.
      • Render results of timestamp after test.

      1.3 Intended Audience

      • Junior or Senior developers.
      • Beginners learning typescript.

      2. Technology Stack

      • Programming Languages: Typescript, Javascript
      • IDE: Visual Studio Code (VSCode)
      • Test: Jest
      • Plugins: Early AI
      • Registory: NPM (Node Package Manager)
      • Source Control: Git and GitHub
      • CI/CD: GitHub Actions
      • Code Analysis: SonarQube

      3. Usage

      3.1 Install Dependency

      1 Type npm install @josephadogeridev/get-timestamp-ts to install dependencies.

        npm install @josephadogeridev/get-timestamp-ts

      3.2 Code Snippet

      import logo from "./logo.svg";
      import "./App.css";
      import { getTimeStamp } from "@josephadogeridev/get-timestamp-ts";
      export function App() {
        const time = getTimeStamp();
        return (
          <div className="App">
              <header className="App-header">
                  <div>        
                      <h1>{time}</h1>
                  </div>
                  <img src={logo} className="App-logo" alt="logo" />
              </header>
          </div>
        )
      }

      4. Tests

      4.1 Test from node_modules

      note : run test from node_modules after Usage

      1 Navigate to cd @josephadogeridev/get-timestamp-ts directory using command below.

        cd node_modules/@josephadogeridev/get-timestamp-ts

      2 Type npm run test to run unit tests.

        npm run test

      import React from 'react';
      import logo from './logo.svg';
      import './App.css';
      import { getTimeStamp } from '@josephadogeridev/get-timestamp-ts';
      
      function App() {
        const time = getTimeStamp();
        return (
          <div className="App">
            <header className="App-header">
              <img src={logo} className="App-logo" alt="logo" />
              <p>
                Edit <code>src/App.tsx</code> and save to reload.
              </p>
              <a
                className="App-link"
                href="https://reactjs.org"
                target="_blank"
                rel="noopener noreferrer"
              >
                Learn React
              </a>
                    {time}
      
            </header>
            {time}
          </div>
        );
      }
      
      export default App;
      Example

      4.2 Test using NPM Pack

      Note : this test was done pre publish to npm manager

      1 In the root of package run npm build to generate build (dist) for production.

        npm run build

      2 In the root of package run npm pack to package the module (dist) into a zipped file (.tgz).

        npm pack

      3 Create or use existing React Application.

      4 Copy and paste the created file in the root of a React Application.

      5 Run command npm install @josephadogeridev/get-timestamp-ts to install created package.

        npm install @josephadogeridev/get-timestamp-ts

      5. License

      LICENSE


      6. References

About

This is a typescript npm package for creating timestamp in readable format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published