collapse-white-space
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,8 +0,8 @@ | ||
'use strict'; | ||
'use strict' | ||
module.exports = collapse; | ||
module.exports = collapse | ||
/* collapse(' \t\nbar \nbaz\t'); // ' bar baz ' */ | ||
function collapse(value) { | ||
return String(value).replace(/\s+/g, ' '); | ||
return String(value).replace(/\s+/g, ' ') | ||
} |
{ | ||
"name": "collapse-white-space", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Replace multiple white-space characters with a single space", | ||
@@ -22,25 +22,34 @@ "license": "MIT", | ||
"devDependencies": { | ||
"browserify": "^14.0.0", | ||
"browserify": "^16.0.0", | ||
"esmangle": "^1.0.1", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"remark-cli": "^5.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"tape": "^4.0.0", | ||
"xo": "^0.18.0" | ||
"xo": "^0.20.0" | ||
}, | ||
"scripts": { | ||
"build-md": "remark . -qfo", | ||
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix", | ||
"build-bundle": "browserify index.js --bare -s collapseWhiteSpace > collapse-white-space.js", | ||
"build-mangle": "esmangle collapse-white-space.js > collapse-white-space.min.js", | ||
"build": "npm run build-md && npm run build-bundle && npm run build-mangle", | ||
"lint": "xo", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
"test-api": "node test", | ||
"test-coverage": "nyc --reporter lcov tape test.js", | ||
"test": "npm run build && npm run lint && npm run test-coverage" | ||
"test": "npm run format && npm run build && npm run test-coverage" | ||
}, | ||
"prettier": { | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"semi": false, | ||
"trailingComma": "none" | ||
}, | ||
"xo": { | ||
"space": true, | ||
"prettier": true, | ||
"esnext": false, | ||
"rules": { | ||
"capitalized-comments": "off" | ||
"capitalized-comments": "off", | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
}, | ||
@@ -55,3 +64,9 @@ "ignores": [ | ||
] | ||
}, | ||
"nyc": { | ||
"check-coverage": true, | ||
"lines": 100, | ||
"functions": 100, | ||
"branches": 100 | ||
} | ||
} |
@@ -16,5 +16,5 @@ # collapse-white-space [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
```javascript | ||
var collapse = require('collapse-white-space'); | ||
var collapse = require('collapse-white-space') | ||
collapse('\tfoo \n\tbar \t\r\nbaz'); //=> ' foo bar baz' | ||
collapse('\tfoo \n\tbar \t\r\nbaz') //=> ' foo bar baz' | ||
``` | ||
@@ -21,0 +21,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4053