{"id":21074779,"url":"https://github.com/dawsbot/deep-blue-string","last_synced_at":"2025-03-14T03:26:31.789Z","repository":{"id":141647947,"uuid":"51333151","full_name":"dawsbot/deep-blue-string","owner":"dawsbot","description":"Apply prototype functions to strings deep in data types","archived":false,"fork":false,"pushed_at":"2016-02-14T23:38:17.000Z","size":113,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T02:32:50.029Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dawsbot.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}},"created_at":"2016-02-08T22:52:22.000Z","updated_at":"2016-02-21T00:55:17.000Z","dependencies_parsed_at":"2023-05-02T01:45:44.909Z","dependency_job_id":null,"html_url":"https://github.com/dawsbot/deep-blue-string","commit_stats":null,"previous_names":["dawsonbotsford/deep-blue-string"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fdeep-blue-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fdeep-blue-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fdeep-blue-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fdeep-blue-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dawsbot","download_url":"https://codeload.github.com/dawsbot/deep-blue-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243517456,"owners_count":20303632,"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-11-19T19:17:55.965Z","updated_at":"2025-03-14T03:26:31.766Z","avatar_url":"https://github.com/dawsbot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-blue-string [![Build Status](https://travis-ci.org/dawsonbotsford/deep-blue-string.svg?branch=master)](https://travis-ci.org/dawsonbotsford/deep-blue-string) [![npm version](https://badge.fury.io/js/deep-blue-string.svg)](https://badge.fury.io/js/deep-blue-string)\n\n\u003e Apply prototype funtions to strings deep in data types\n\n\u003cbr\u003e\n\n![logo](logo.jpg)\n\n\u003cbr\u003e\n\n## Install\n\n```\nnpm install --save deep-blue-string\n```\n\n\n\u003cbr\u003e\n\n## Usage\n\n```js\nconst dbs = require('deep-blue-string');\n\n//Sanitize any data type\ndbs({userInput: 'DROP TABLE admin'}, String.prototype.replace, ['DROP TABLE', 'not in my house']);\n//=\u003e {userInput: 'not in my house admin'}\n```\n\n\u003cbr\u003e\n\n## API\n\n### dbs(target, function, [fnArgs])\n\n##### target\n\n*Required*  \nType: Any  \n\n##### function\n\n*Required*  \nType: `function`\n\n##### fnArgs\n\n*Optional*  \nType: `string` || `array`  \nDescription: If the user inputted function takes arguments, supply them here. For multiple arguments (like `String.prototype.replace`, input them as an array).\n\n#### Function overview\n\nApply function to all strings in `target`. Deeply nested strings will be found and operated on. No casting will be done on inputted `target`.\n\n\u003cbr\u003e\n\n## Features\n\nSupported `target` Data Types:\n* String\n* Array\n* Objects\n  * Object object\n  * Strings as objects\n  * Arrays as objects\n  * Numbers as objects (returned unmodified)\n  * Booleans as objects (returned unmodified)\n  * Regex\tas objects (returned unmodified)\n  * Function as objects (returned unmodified)\n  * Date objects   (returned unmodified)\n* Number\t(returned unmodified)\n* Boolean\t(returned unmodified)\n* Undefined (returned unmodified)\n* Function (returned unmodified)\n* Symbol (returned unmodified)\n\n\u003cbr\u003e\n\n## Related\n* [object-types](https://github.com/dawsonbotsford/object-types)\n* [hugg](https://github.com/dawsonbotsford/hugg)\n\n\u003cbr\u003e\n\n## License\n\nMIT © [dawsonbotsford](http://dawsonbotsford.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsbot%2Fdeep-blue-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdawsbot%2Fdeep-blue-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsbot%2Fdeep-blue-string/lists"}