Gathering detailed insights and metrics for craydent-http
Gathering detailed insights and metrics for craydent-http
Gathering detailed insights and metrics for craydent-http
Gathering detailed insights and metrics for craydent-http
npm install craydent-http
Typescript
Module System
Node Version
NPM Version
TypeScript (62.82%)
JavaScript (37.02%)
Shell (0.17%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
259 Commits
1 Watchers
2 Branches
2 Contributors
Updated on Aug 15, 2022
Latest Version
1.0.2
Package Id
craydent-http@1.0.2
Unpacked Size
83.97 kB
Size
12.19 kB
File Count
23
NPM Version
10.5.2
Node Version
21.4.0
Published on
Sep 20, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
54
by Clark Inada
Craydent is all inclusive utility library. There are several ways to use the library in NodeJS. More detailed documentation on constants can be found at Craydent Properties. More detailed documentation on methods can be found at Craydent Methods
1// require with prototypes - this require will add prototypes to extend classes and add two constants ($c, $g) to the global space. 2// $g is an alias to global and $c is the constant containing all the utility methods and properties. 3require('craydent-http'); 4$c.logit($c.VERSION); 5arr.prototypedMethod(args);
1// require no conflict - this require is the fully modular version with no global constants, prototypes, or methods. 2var $c = require('craydent-http/noConflict'); 3$c.logit($c.VERSION); 4$c.prototypedMethod(arr, args);
1// require global - this require constants and methods in the global space and add prototypes to extend classes. 2// $g is an alias to global and $c is the constant containing all the utility methods and properties. 3require('craydent-http/global'); 4logit($c.VERSION); 5arr.prototypedMethod(args);
Note: All methods and properties defined in the http module must be used as a property of the context (this) within the createServer callback method.
Craydent is all inclusive utility library. There are several ways to use the library in NodeJS. More detailed documentation on constants can be found at Craydent Properties. More detailed documentation on methods can be found at Craydent Methods
1// require with prototypes - this require will add prototypes to extend classes and add two constants ($c, $g) to the global space. 2// $g is an alias to global and $c is the constant containing all the utility methods and properties. 3require('craydent-http'); 4$c.createServer(function(req, res){ this.$GET(); });
1// require no conflict - this require is the fully modular version with no global constants, prototypes, or methods. 2var $c = require('craydent-http/noConflict'); 3$c.createServer(function(req, res){ this.$GET(); });
1// require global - this require constants and methods in the global space and add prototypes to extend classes. 2// $g is an alias to global and $c is the constant containing all the utility methods and properties. 3require('craydent-http/global'); 4createServer(function(req, res){ this.$GET(); });
ACCEPT_ENCODING (String) | IE (Boolean) | PRINCE (Boolean) |
ACCEPT_LANGUAGE (String) | IE6 (Boolean) | PROTOCOL (String) |
AMAYA (Boolean) | IE7 (Boolean) | PUBLIC_IP (String) |
ANDROID (Boolean) | IE8 (Boolean) | REFERER (String) |
BALANCE_SERVER_LIST (Array) | IE_VERSION (Number) | REFERER_IP (String) |
BLACKBERRY (Boolean) | IPAD (Boolean) | RESPONSES (Object) |
BROWSER (Object) | IPHONE (Boolean) | REST_API_TEMPLATE (String) |
CHROME (Boolean) | IPOD (Boolean) | ROUTE_API_PATH (String) |
CHROME_VERSION (Number) | KHTML (Boolean) | ROUTE_LOGO_URL (String) |
CLIENT (Object) | LINUX (Boolean) | SAFARI (Boolean) |
CONSOLE_COLORS (Object) | LOCAL_IP (String) | SAFARI_VERSION (Number) |
CORES_SUPPORT (Boolean) | MAC (Boolean) | SERVER (String) |
DEBUG_MODE (Boolean) | MODULES_LOADED (Object) | SERVER_PATH (String) |
DEFER_END (Boolean) | OPERA (Boolean) | SYMBIAN (Boolean) |
DEVICE (Object) | OPERA_VERSION (Number) | TEMPLATE_TAG_CONFIG (Object) |
ENGINE (Object) | ORIGIN (String) | TEMPLATE_VARS (Array) |
ERROR_TYPES (Array) | OS (Object) | TRIDENT (Boolean) |
EXPOSE_ROUTE_API (String) | PAGE_NAME (String) | VERBOSE_LOGS (String) |
FIREFOX (Boolean) | PAGE_NAME_RAW (String) | VERSION (String) |
FIREFOX_VERSION (Number) | PALM (Boolean) | WEBKIT (Boolean) |
GEKKO (Boolean) | PRAGMA (String) | WINDOWS (Boolean) |
HTTP_STATUS_TEMPLATE (Object) | PRESTO (Boolean) | WINDOWS_MOBILE (Boolean) |
$l (Object) | raw (String) | server (Object) |
GarbageCollector (Array) | request (Object) | session (Object) |
location (Object) | response (Object) | sessionid (String) |
name (String) | response_sent (Boolean) | |
navigator (Object) | rest (Boolean) |
Info: Get/set Cookies
Return: (String|Bool)
Parameters:
- key: (String) Key for cookie value
- option?: (CookieOptions) Specify delete
Overloads:
Parameters
- keyValue: (Object) Specify the key value pair: key=>property, value=>object[key]
- option?: (CookieOptions) Specify path, domain, and/or expiration of cookie
Parameters
- key: (String) Key for cookie value
- value: (any) Value to store
- option?: (CookieOptions) Specify path and/or expiration of cookie
Info: Retrieve all or specific variables in the Body
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the Body
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the url
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (GetOptions|VerbOptionsTypes|String) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the headers
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the Body
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the Body
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Retrieve all or specific variables in the Body
Return: (Bool|Object)
Parameters:
None
Overloads:
Parameters
- key: (String) key for query value
- options?: (VerbOptionsTypes|VerbOptions) Options to defer, ignore case, etc
Info: Get Chrome version
Return: (Float)
Parameters:
None
Overloads:
None
Info: Get Firefox version
Return: (Float)
Parameters:
None
Overloads:
None
Info: Get Internet Explorer version
Return: (Float)
Parameters:
None
Overloads:
None
Info: Get Opera version
Return: (Float)
Parameters:
None
Overloads:
None
Info: Get Safari version
Return: (Float)
Parameters:
None
Overloads:
None
Info: Create http server, ability to run middleware, and define routes.
Return: (HTTP)
Parameters:
- callback: (HTTPCallback) Function to callback when a request is received
- createServer?: (HTTPOptions) Options for creating the server (ex: {createServer:require('http').createServer})
Overloads:
Parameters
- options: (HTTPOptions) Function to callback when a request is received
Info: Echo to buffer and use in response
Return: (void)
Parameters:
- output: (String) Data to send in response
Overloads:
None
Info: Call the next function(s) in queue
Return: (void)
Parameters:
None
Overloads:
Parameters
- status?: (Integer) HTTP status code.
- output?: (String) output to send as response.
- encoding?: (String) encoding for the response.
Info: Asynchronous retrieval of the session object when used in conjunction with createServer
Return: (Promise
Parameters:
- sid: (String) Session id of the session object to retrieve syncronously.
- callback?: (SessionCallback) callback function to invoke once the session object is retrieved.
Overloads:
None
Info: Retrieve the session id when used in conjunction with createServer
Return: (String)
Parameters:
None
Overloads:
None
Info: Syncronously retrieve the session object when used in conjunction with createServer
Return: (Session)
Parameters:
- sid: (String) Session id of the session object to retrieve syncronously.
Overloads:
None
Info: Set Http Headers to send
Return: (void)
Parameters:
- header: (Header) Http header.
- code?: (Integer) Http response code.
Overloads:
None
Info: Check if browser is Amaya
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is Android
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is BlackBerry
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Chrome
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Firefox
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is Gecko
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Internet Explorer
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Internet Explorer 6
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is iPad
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is IPhone
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is IPod
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is KHTML
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if OS is Linux
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if OS is Mac Based
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if the device is a Mobile device
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Opera
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if OS is PalmOS
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is Presto
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is Prince
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if browser is Safari
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if OS is Symbian
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is Trident
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if engine is Webkit
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if OS is Windows
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Check if device is Windows Mobile
Return: (Bool)
Parameters:
None
Overloads:
None
Info: Recursively require the entire directory and returns an object containing the required modules.
Return: (void)
Parameters:
- data: (Object) Object to send in response.
Overloads:
Parameters
- status: (Integer) Status code for response.
- data: (Object) Object to send in response.
Info: Dump of variables to response.
Return: (void)
Parameters:
- ...infinite: (any) any number of arguments can be passed.
Overloads:
None
Info: Writes session to filesystem to be retrieved later.
Return: (void)
Parameters:
None
Overloads:
None
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More