package
Apply prototype functions to strings deep within data types
npm install deep-blue-stringGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 3 packages.
3.4 kB
Includes dependencies.
Apply prototype funtions to strings deep in data types

npm install --save deep-blue-stringconst dbs = require('deep-blue-string');
//Sanitize any data type
dbs({userInput: 'DROP TABLE admin'}, String.prototype.replace, ['DROP TABLE', 'not in my house']);
//=> {userInput: 'not in my house admin'}Required
Type: Any
Required
Type: function
Optional
Type: string || array
Description: If the user inputted function takes arguments, supply them here. For multiple arguments (like String.prototype.replace, input them as an array).
Apply function to all strings in target. Deeply nested strings will be found and operated on. No casting will be done on inputted target.
Supported target Data Types:
MIT © dawsonbotsford