{"id":22793648,"url":"https://github.com/cmtt/konstant","last_synced_at":"2025-07-19T04:05:00.679Z","repository":{"id":6763477,"uuid":"8010137","full_name":"cmtt/Konstant","owner":"cmtt","description":"Provides type declarations in the global context and manages custom constants.","archived":false,"fork":false,"pushed_at":"2013-02-04T15:52:52.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T12:52:43.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmtt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-04T15:39:15.000Z","updated_at":"2023-03-08T04:59:17.000Z","dependencies_parsed_at":"2022-09-13T14:42:10.579Z","dependency_job_id":null,"html_url":"https://github.com/cmtt/Konstant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmtt/Konstant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmtt%2FKonstant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmtt%2FKonstant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmtt%2FKonstant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmtt%2FKonstant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmtt","download_url":"https://codeload.github.com/cmtt/Konstant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmtt%2FKonstant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265887480,"owners_count":23844412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T03:28:07.914Z","updated_at":"2025-07-19T04:05:00.661Z","avatar_url":"https://github.com/cmtt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Konstant\n\nThis is a JavaScript module which provides constants for browser and server environments. Its main purpose is to define the six available types in the global context (TYPE_FUNCTION, TYPE_STRING, TYPE_OBJECT, TYPE_BOOLEAN, \nTYPE_NUMBER, TYPE_UNDEFINED).\n\n## Installation \n\n    npm install konstant\n\n## Usage\n\nOn the server, a simple\n\n    require('konstant');\n\nis sufficient for defining the type declarations. In a browser environment, the script just needs to be included in your DOM. \n\nWhen additional constants are needed, the module should be initialized on the server as follows:\n\n    // Server environment\n    \n    var Konstant = require('konstant');\n\n## Functions\n\n### Konstant.define (key, value, inGlobal)\n### Konstant.define (object, inGlobal)\n\nWith define, a new constant can be defined. You can provide either a hashmap or key-value-pairs. When inGlobal is set to true, the constant will be made available in the global context (which is the window object in a browser environment).\n\n### Konstant.defined (key)\n\nReturns true or false, depending on whether a constant has been defined or not.\n\n### Konstant.get (key)\n\nReturns the given constant or throws an error if it hasn't been defined.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmtt%2Fkonstant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmtt%2Fkonstant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmtt%2Fkonstant/lists"}