{"id":28530943,"url":"https://github.com/okturtles/turtledash","last_synced_at":"2026-02-28T07:34:03.949Z","repository":{"id":275447783,"uuid":"921333302","full_name":"okTurtles/turtledash","owner":"okTurtles","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-09T18:07:55.000Z","size":71,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-21T18:48:06.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okTurtles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T19:01:29.000Z","updated_at":"2025-07-07T14:53:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"705ff757-ea66-4c0e-a1fd-d3d3380c7940","html_url":"https://github.com/okTurtles/turtledash","commit_stats":null,"previous_names":["okturtles/turtledash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/okTurtles/turtledash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fturtledash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fturtledash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fturtledash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fturtledash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okTurtles","download_url":"https://codeload.github.com/okTurtles/turtledash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fturtledash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29927586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-06-09T14:37:50.149Z","updated_at":"2026-02-28T07:34:03.944Z","avatar_url":"https://github.com/okTurtles.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# turtledash\n\nTiny, efficient, TypeScript utility functions inspired by Lodash.\n\n## Installation\n\n```bash\nnpm install turtledash\n```\n\n## Features\n\nturtledash provides a collection of utility functions for working with objects, arrays, and more:\n\n- Lightweight implementation of common utility functions\n- Fully typed with TypeScript\n- Zero dependencies\n- MIT licensed\n\n## API Reference\n\n### Object Functions\n\n#### `mapValues\u003cT, U\u003e(obj, fn, [o])`\nMaps the values of an object to create a new object with the same keys.\n\n```ts\nconst users = { 'fred': { 'age': 40 }, 'pebbles': { 'age': 1 } };\nmapValues(users, user =\u003e user.age); // { 'fred': 40, 'pebbles': 1 }\n```\n\n#### `mapObject\u003cT, U\u003e(obj, fn)`\nMaps an object's entries and returns a new object.\n\n#### `pick\u003cT, K\u003e(o, props)`\nCreates an object composed of the picked object properties.\n\n#### `pickWhere\u003cT\u003e(o, where)`\nCreates an object with properties that satisfy the provided predicate function.\n\n#### `omit\u003cT, K\u003e(o, props)`\nCreates an object composed of properties not included in the provided array.\n\n#### `cloneDeep\u003cT\u003e(obj)`\nCreates a deep clone of the value.\n\n#### `merge\u003cT, U\u003e(obj, src)`\nRecursively merges own properties of the source object into the target object.\n\n#### `get\u003cT, K\u003e(obj, path, defaultValue)`\nGets the value at path of object. If the resolved value is undefined, the defaultValue is returned.\n\n### Array Functions\n\n#### `choose\u003cT\u003e(array, indices)`\nCreates an array of elements selected from the original array at the specified indices.\n\n#### `flatten\u003cT\u003e(arr)`\nFlattens an array a single level deep.\n\n#### `zip\u003cT\u003e(...arr)`\nCreates an array of grouped elements.\n\n#### `uniq\u003cT\u003e(array)`\nCreates an array of unique values.\n\n#### `union\u003cT\u003e(...arrays)`\nCreates an array of unique values from all given arrays.\n\n#### `intersection\u003cT\u003e(a1, ...arrays)`\nCreates an array of unique values that are included in all given arrays.\n\n#### `difference\u003cT\u003e(a1, ...arrays)`\nCreates an array of values from the first array that are not included in the other arrays.\n\n### Other Utility Functions\n\n#### `delay(msec)`\nReturns a Promise that resolves after the specified number of milliseconds.\n\n#### `randomBytes(length)`\nGenerates cryptographically strong random bytes.\n\n#### `randomHexString(length)`\nGenerates a random hex string.\n\n#### `normalizeString(str)`\nNormalizes strings by replacing punctuation marks and applying unicode normalization.\n\n#### `randomIntFromRange(min, max)`\nGenerates a random integer between min and max, inclusive.\n\n#### `randomFromArray\u003cT\u003e(arr)`\nReturns a random element from an array.\n\n#### `linearScale([d1, d2], [r1, r2])`\nCreates a function that linearly scales a value from one range to another.\n\n#### `deepEqualJSONType(a, b)`\nPerforms a deep equality check on JSON-compatible objects.\n\n#### `hashableRepresentation(unsorted)`\nCreates a consistently sortable representation of an object for hashing purposes.\n\n#### `debounce\u003cA, R, C\u003e(func, wait, immediate)`\nCreates a debounced function that delays invoking the provided function.\n\n#### `throttle\u003cA, R\u003e(func, delay)`\nCreates a throttled function that only invokes the provided function at most once per specified interval.\n\n## Examples\n\n```ts\nimport { \n  mapValues, \n  pick, \n  debounce, \n  randomIntFromRange \n} from 'turtledash';\n\n// Transform all values in an object\nconst users = { 'fred': { 'age': 40 }, 'pebbles': { 'age': 1 } };\nconst ages = mapValues(users, user =\u003e user.age);\n// { 'fred': 40, 'pebbles': 1 }\n\n// Pick specific properties from an object\nconst user = { id: 1, name: 'John', email: 'john@example.com', role: 'admin' };\nconst credentials = pick(user, ['name', 'email']);\n// { name: 'John', email: 'john@example.com' }\n\n// Create a debounced function\nconst saveChanges = debounce(() =\u003e {\n  // Save data to server\n  console.log('Saving changes...');\n}, 500);\n\n// Generate a random number in a range\nconst randomValue = randomIntFromRange(1, 100);\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fturtledash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokturtles%2Fturtledash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fturtledash/lists"}