{"library":"slang","title":"Slang (Devon Govett) String Utilities","description":"Slang is a lightweight JavaScript library providing a collection of utility functions for common string manipulations, such as capitalization, camel case conversion, dasherization, and pluralization. Originally published over a decade ago (v0.3.0, December 2013), it was designed for use in both browser environments and CommonJS Node.js projects. The library is stable in its functionality but has not seen active development or maintenance since its last release. Key differentiators at the time included its small footprint and a focus on essential string transformations. Due to its age, it primarily uses CommonJS module patterns and lacks native ESM support or TypeScript definitions, making it less suitable for modern, type-safe, or highly modular JavaScript/TypeScript ecosystems without additional tooling or shims.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install slang"],"cli":null},"imports":["import slang from 'slang';","import slang from 'slang'; slang.capitalize('hello');","const slang = require('slang');\nconst camelizedString = slang.camelize('hello world');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const slang = require('slang');\n\n// Basic string manipulation\nconst capitalized = slang.capitalize('hello world');\nconsole.log(`Capitalized: ${capitalized}`); // Expected: Hello world\n\nconst camelized = slang.camelize('hello world string');\nconsole.log(`Camelized: ${camelized}`); // Expected: helloWorldString\n\nconst dasherized = slang.dasherize('yet another example');\nconsole.log(`Dasherized: ${dasherized}`); // Expected: yet-another-example\n\n// Pluralization (with default English language)\nconst pluralWord = slang.pluralize('cat', 2);\nconsole.log(`Plural (2 cats): ${pluralWord}`); // Expected: cats\n\nconst singularWord = slang.singularize('dogs');\nconsole.log(`Singular (dogs): ${singularWord}`); // Expected: dog\n\n// Check if string\nconst isItString = slang.isString('test');\nconsole.log(`Is 'test' a string? ${isItString}`); // Expected: true\n\n// Example of older, less common features\n// Note: addToPrototype is generally discouraged in modern JS\n// slang.addToPrototype();\n// console.log('another example'.capitalize()); // This would work if prototype was extended\n","lang":"javascript","description":"Demonstrates how to import the `slang` library using CommonJS and utilize several of its core string utility functions like `capitalize`, `camelize`, `dasherize`, `pluralize`, and `isString`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}