{"id":27667,"library":"craydent-utility","title":"Craydent Utility","description":"Craydent is an all-inclusive Node.js utility library providing over 100+ methods and constants for common tasks like AJAX, file system operations, GUID generation, MD5 hashing, path manipulation, and object/array extensions. Version 1.0.2 is the latest stable release. It offers three import modes: prototype-extending (default), no-conflict modular, and global. Ships TypeScript types. Differentiators include prototype augmentation, global constants, and built-in AJAX support.","status":"active","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/craydent/Node-Library","tags":["javascript","ajax","cluster","craydent","es6","fs","guid","jquery","library","typescript"],"install":[{"cmd":"npm install craydent-utility","lang":"bash","label":"npm"},{"cmd":"yarn add craydent-utility","lang":"bash","label":"yarn"},{"cmd":"pnpm add craydent-utility","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The default require adds prototypes and global constants ($c, $g). Use 'noConflict' subpath to avoid global pollution.","wrong":"const $c = require('craydent-utility'); $c.logit('test');","symbol":"$c (default require)","correct":"const $c = require('craydent-utility/noConflict'); $c.logit('test');"},{"note":"Default require adds $c and $g to global scope and extends native prototypes. ESM imports are not supported directly.","wrong":"import { VERSION } from 'craydent-utility';","symbol":"global constants and prototypes","correct":"require('craydent-utility'); console.log($c.VERSION); arr.prototypedMethod(args);"},{"note":"The 'global' subpath adds methods/constants to global scope without exposing a module object.","wrong":"const $c = require('craydent-utility/global'); $c.logit($c.VERSION);","symbol":"global-only mode","correct":"require('craydent-utility/global'); logit($c.VERSION);"}],"quickstart":{"code":"// Using no-conflict mode (recommended)\nconst $c = require('craydent-utility/noConflict');\n\n// Example: AJAX call\n$c.ajax('https://api.example.com/data', 'json')\n  .then(data => console.log('Data:', data))\n  .catch(err => console.error('Error:', err));\n\n// Example: Generate GUID\nconst guid = $c.guid();\nconsole.log('GUID:', guid);\n\n// Example: MD5 hash\nconst hash = $c.md5('hello world');\nconsole.log('MD5:', hash);\n\n// Example: Create directory recursively\n$c.mkdir('/tmp/a/b/c', { recursive: true });","lang":"javascript","description":"Demonstrates no-conflict require, AJAX call, GUID generation, MD5 hashing, and recursive mkdir."},"warnings":[{"fix":"Use require('craydent-utility/noConflict') instead to avoid global pollution and prototype modifications.","message":"Default require adds $c and $g to global scope and extends native prototypes (Array, String, etc.). This can cause conflicts with other libraries.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use CommonJS require() instead of import.","message":"The library does not support ES module (ESM) imports. Attempting import will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check documentation for return types; use callbacks or promises as indicated.","message":"Methods like zipit() return string paths; not promises. Asynchronous behavior may not be obvious.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Only use the default require when you need global exception handlers.","message":"Some methods (e.g., _catchAll) are global and cannot be imported selectively; they must be required from the root.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use require('craydent-utility') before accessing $c, or use require('craydent-utility/noConflict') and assign to a local variable.","cause":"Used $c without requiring the default mode that sets global $c.","error":"ReferenceError: $c is not defined"},{"fix":"Use require('craydent-utility') (default) to extend prototypes, or call the static version: $c.prototypedMethod(arr, args).","cause":"Prototypes not extended because no-conflict mode was used.","error":"TypeError: arr.prototypedMethod is not a function"},{"fix":"Upgrade to version 1.0.0 or later.","cause":"Older version of craydent-utility that doesn't support the noConflict subpath.","error":"Cannot find module 'craydent-utility/noConflict'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}