Removes all spaces from a string.
| const space = require("just-a-space"); | |
| console.log(typeof space, space.length, space === " "); // string 1 true |
| module.exports = function tiny(string) { | |
| if (typeof string !== "string") throw new TypeError("Tiny wants a string!"); | |
| return string.replace(/\s/g, ""); | |
| }; |
| { | |
| "name": "@bamblehorse/tiny", | |
| "version": "1.0.0", | |
| "description": "Removes all spaces from a string", | |
| "license": "MIT", | |
| "repository": "bamblehorse/tiny", | |
| "main": "index.js", | |
| "keywords": [ | |
| "tiny", | |
| "npm", |
I hereby claim:
To claim this, I am signing this object:
| {"lastUpload":"2022-01-27T16:21:13.616Z","extensionVersion":"v3.4.3"} |