Skip to content

Commit ae4f2e9

Browse files
浩知haozi
authored andcommitted
update package.json
1 parent dd7557e commit ae4f2e9

File tree

8 files changed

+9414
-108
lines changed

8 files changed

+9414
-108
lines changed

.config/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {getConfig, getGzipSize, red, blue, write, uglify, camelize} from './util'
1+
import { getConfig, getGzipSize, red, blue, write, uglify, camelize } from './util'
22
import postcss from 'postcss'
33
import autoprefixer from 'autoprefixer'
44
import px2rem from 'postcss-px2rem'

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
src/
55
test/
66
.nyc_output/
7-
.script/
87
coverage/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# safe-trim
22
---
33

4-
[![Build Status](https://travis-ci.org/haozime/safe-trim.svg?branch=1.0.7)](https://travis-ci.org/haozime/safe-trim/branches)
5-
[![codecov](https://codecov.io/gh/haozime/safe-trim/branch/master/graph/badge.svg)](https://codecov.io/gh/haozime/safe-trim)
6-
[![dependencies Status](https://david-dm.org/haozime/safe-trim/status.svg)](https://david-dm.org/haozime/safe-trim)
7-
[![devDependencies Status](https://david-dm.org/haozime/safe-trim/dev-status.svg)](https://david-dm.org/haozime/safe-trim?type=dev)
4+
[![Build Status](https://travis-ci.org/aligay/safe-trim.svg?branch=1.0.15)](https://travis-ci.org/aligay/safe-trim/branches)
5+
[![codecov](https://codecov.io/gh/aligay/safe-trim/branch/master/graph/badge.svg)](https://codecov.io/gh/aligay/safe-trim)
6+
[![dependencies Status](https://david-dm.org/aligay/safe-trim/status.svg)](https://david-dm.org/aligay/safe-trim)
7+
[![devDependencies Status](https://david-dm.org/aligay/safe-trim/dev-status.svg)](https://david-dm.org/aligay/safe-trim?type=dev)
88

99
## install
1010
```

dist/safe-trim.common.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
/*!
2-
* safe-trim v1.0.15
2+
* safe-trim v1.1.0
33
* (c) 2019 Jerry
44
* Released under the MIT License.
55
*/
66
function safeTrim (string) {
7-
var SP = ' '; // common space
8-
var TAB = '\t'; // tab
9-
var CR = '\r'; // Carriage Return, Used as a new line character in Mac OS before X
10-
var LF = '\n'; // Line Feed, Used as a new line character in Unix/Mac OS X
11-
var CR_LF = '\r\n'; // Used as a new line character in Windows
7+
var SP = ' ' // common space
8+
var TAB = '\t' // tab
9+
var CR = '\r' // Carriage Return, Used as a new line character in Mac OS before X
10+
var LF = '\n' // Line Feed, Used as a new line character in Unix/Mac OS X
11+
var CR_LF = '\r\n' // Used as a new line character in Windows
1212
var ZERO_WIDTH_SPACE = '\v' + // \x0B VT 垂直制表符
1313
'\f' + // \x0C FF 换页符
14-
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D';
14+
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D'
1515
var OTHER_SPACE =
16-
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
16+
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000'
1717

18-
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE;
18+
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE
1919

20-
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
21-
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
22-
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
23-
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
20+
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
21+
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
22+
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
23+
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')
2424

2525
return (string + '')
2626
.replace(leftReg, '') // trim left
@@ -33,4 +33,4 @@ function safeTrim (string) {
3333
.trim() // safety
3434
}
3535

36-
module.exports = safeTrim;
36+
module.exports = safeTrim;

dist/safe-trim.es.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
/*!
2-
* safe-trim v1.0.15
2+
* safe-trim v1.1.0
33
* (c) 2019 Jerry
44
* Released under the MIT License.
55
*/
66
function safeTrim (string) {
7-
var SP = ' '; // common space
8-
var TAB = '\t'; // tab
9-
var CR = '\r'; // Carriage Return, Used as a new line character in Mac OS before X
10-
var LF = '\n'; // Line Feed, Used as a new line character in Unix/Mac OS X
11-
var CR_LF = '\r\n'; // Used as a new line character in Windows
7+
var SP = ' ' // common space
8+
var TAB = '\t' // tab
9+
var CR = '\r' // Carriage Return, Used as a new line character in Mac OS before X
10+
var LF = '\n' // Line Feed, Used as a new line character in Unix/Mac OS X
11+
var CR_LF = '\r\n' // Used as a new line character in Windows
1212
var ZERO_WIDTH_SPACE = '\v' + // \x0B VT 垂直制表符
1313
'\f' + // \x0C FF 换页符
14-
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D';
14+
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D'
1515
var OTHER_SPACE =
16-
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
16+
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000'
1717

18-
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE;
18+
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE
1919

20-
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
21-
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
22-
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
23-
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
20+
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
21+
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
22+
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
23+
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')
2424

2525
return (string + '')
2626
.replace(leftReg, '') // trim left
@@ -33,4 +33,4 @@ function safeTrim (string) {
3333
.trim() // safety
3434
}
3535

36-
export default safeTrim;
36+
export default safeTrim;

dist/safe-trim.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/*!
2-
* safe-trim v1.0.15
2+
* safe-trim v1.1.0
33
* (c) 2019 Jerry
44
* Released under the MIT License.
55
*/
66
(function (global, factory) {
7-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8-
typeof define === 'function' && define.amd ? define(factory) :
9-
(global.safeTrim = factory());
7+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8+
typeof define === 'function' && define.amd ? define(factory) :
9+
(global.safeTrim = factory());
1010
}(this, (function () {
1111

1212
function safeTrim (string) {
13-
var SP = ' '; // common space
14-
var TAB = '\t'; // tab
15-
var CR = '\r'; // Carriage Return, Used as a new line character in Mac OS before X
16-
var LF = '\n'; // Line Feed, Used as a new line character in Unix/Mac OS X
17-
var CR_LF = '\r\n'; // Used as a new line character in Windows
13+
var SP = ' ' // common space
14+
var TAB = '\t' // tab
15+
var CR = '\r' // Carriage Return, Used as a new line character in Mac OS before X
16+
var LF = '\n' // Line Feed, Used as a new line character in Unix/Mac OS X
17+
var CR_LF = '\r\n' // Used as a new line character in Windows
1818
var ZERO_WIDTH_SPACE = '\v' + // \x0B VT 垂直制表符
1919
'\f' + // \x0C FF 换页符
20-
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D';
20+
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D'
2121
var OTHER_SPACE =
22-
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
22+
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000'
2323

24-
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE;
24+
var ALL_SPACE = SP + TAB + CR + LF + CR_LF + ZERO_WIDTH_SPACE + OTHER_SPACE
2525

26-
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
27-
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
28-
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
29-
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
26+
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
27+
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
28+
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
29+
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')
3030

3131
return (string + '')
3232
.replace(leftReg, '') // trim left
@@ -41,4 +41,4 @@ function safeTrim (string) {
4141

4242
return safeTrim;
4343

44-
})));
44+
})));

package.json

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,107 @@
11
{
22
"name": "safe-trim",
3-
"version": "1.0.15",
3+
"version": "1.1.0",
44
"description": "trim sting and remove zero-width-space in content",
5+
"keywords": [
6+
"no-break",
7+
"safeTrim",
8+
"space",
9+
"spaces",
10+
"trim",
11+
"unicode",
12+
"zero-width-space"
13+
],
14+
"homepage": "https://github.com/aligay/safe-trim#readme",
15+
"bugs": {
16+
"url": "https://github.com/aligay/safe-trim/issues"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/aligay/safe-trim.git"
21+
},
22+
"license": "MIT",
523
"author": "Jerry",
624
"contributors": [
725
"Jerry"
826
],
927
"main": "dist/safe-trim.common.js",
1028
"module": "dist/safe-trim.es.js",
1129
"scripts": {
12-
"start": "npm run dev",
13-
"dev": "npm run clear && npm run fix && cross-env NODE_ENV=development webpack-dev-server --progress --config .config/webpack.dev.config.js --hot --inline --host 0.0.0.0 --port 8080",
30+
"babel-node": "babel-node --presets es2015,es2016,es2017 --plugins transform-runtime",
1431
"build": "npm run clear && cross-env NODE_ENV=production npm run lint && npm run babel-node .config/rollup.config.js",
15-
"lint": "eslint --ext .js,.vue src .config .script test/*_spec.js",
1632
"clear": "rimraf dist .nyc_output coverage; mkdirp dist",
17-
"prepublish": "npm run test",
18-
"babel-node": "babel-node --presets es2015,es2016,es2017 --plugins transform-runtime",
33+
"dev": "npm run clear && npm run fix && cross-env NODE_ENV=development webpack-dev-server --progress --config .config/webpack.dev.config.js --hot --inline --host 0.0.0.0 --port 8080",
1934
"fix": "standard src/**/*.js --fix >/dev/null 2>&1",
20-
"test": "npm run build && npm run jasmine",
21-
"jasmine": "istanbul cover jasmine-node spec"
35+
"jasmine": "istanbul cover jasmine-node spec",
36+
"lint": "eslint --ext .js,.vue src .config scripts spec/*_spec.js",
37+
"prepublish": "npm run test",
38+
"start": "npm run dev",
39+
"test": "npm run build && npm run jasmine"
2240
},
2341
"config": {
2442
"ghooks": {
2543
"pre-commit": "cross-env NODE_ENV=production node scripts/checkVersion.js && npm run lint && npm run test",
2644
"pre-push": "git status"
2745
}
2846
},
29-
"ava": {
30-
"require": [
31-
"./test/helpers/setup-browser-env.js"
32-
]
33-
},
34-
"keywords": [
35-
"safeTrim",
36-
"trim",
37-
"unicode",
38-
"spaces",
39-
"no-break",
40-
"space",
41-
"zero-width-space",
42-
"space"
43-
],
44-
"license": "MIT",
4547
"devDependencies": {
46-
"autoprefixer": "^7.2.5",
47-
"ava": "^0.24.0",
48+
"autoprefixer": "^9.4.9",
49+
"ava": "^1.2.1",
4850
"babel-cli": "^6.24.0",
49-
"babel-eslint": "^8.2.1",
51+
"babel-eslint": "^10.0.1",
5052
"babel-plugin-transform-runtime": "^6.15.0",
5153
"babel-preset-es2015": "^6.24.1",
5254
"babel-preset-es2016": "^6.24.1",
5355
"babel-preset-es2017": "^6.24.1",
5456
"browser-env": "^3.2.4",
5557
"compare-versions": "^3.0.0",
5658
"cross-env": "^5.1.3",
57-
"css-loader": "^0.28.8",
58-
"eslint": "^4.15.0",
59-
"eslint-config-standard": "^10.2.1",
60-
"eslint-friendly-formatter": "^3.0.0",
61-
"eslint-loader": "^1.6.1",
59+
"css-loader": "^2.1.0",
60+
"eslint": "^5.14.1",
61+
"eslint-config-standard": "^12.0.0",
62+
"eslint-friendly-formatter": "^4.0.1",
63+
"eslint-loader": "^2.1.2",
6264
"eslint-plugin-flow-vars": "^0.5.0",
63-
"eslint-plugin-html": "^4.0.1",
64-
"eslint-plugin-promise": "^3.4.0",
65-
"eslint-plugin-standard": "^3.0.1",
65+
"eslint-plugin-html": "^5.0.3",
66+
"eslint-plugin-import": "^2.16.0",
67+
"eslint-plugin-node": "^8.0.1",
68+
"eslint-plugin-promise": "^4.0.1",
69+
"eslint-plugin-standard": "^4.0.0",
6670
"ghooks": "^2.0.2",
67-
"gzip-size": "^4.1.0",
71+
"gzip-size": "^5.0.0",
6872
"istanbul": "^0.4.5",
6973
"jasmine-node": "^1.14.5",
70-
"less": "^2.7.1",
74+
"less": "^3.9.0",
7175
"less-loader": "^4.0.5",
7276
"mkdirp": "^0.5.1",
73-
"nyc": "^11.4.1",
74-
"postcss-loader": "^2.0.10",
77+
"nyc": "^13.3.0",
78+
"postcss-loader": "^3.0.0",
7579
"postcss-px2rem": "^0.3.0",
7680
"rimraf": "^2.5.4",
7781
"rollup-loader": "^0.3.0",
78-
"rollup-plugin-buble": "^0.18.0",
79-
"rollup-plugin-commonjs": "^8.2.6",
82+
"rollup-plugin-buble": "^0.19.6",
83+
"rollup-plugin-commonjs": "^9.2.1",
8084
"rollup-plugin-less": "^0.1.1",
81-
"rollup-plugin-node-resolve": "^3.0.2",
85+
"rollup-plugin-node-resolve": "^4.0.1",
8286
"rollup-plugin-replace": "^2.0.0",
83-
"rollup-plugin-uglify": "^2.0.1",
84-
"rollup-plugin-vue": "^3.0.0",
87+
"rollup-plugin-uglify": "^6.0.2",
88+
"rollup-plugin-vue": "^4.7.2",
8589
"safe-trim": "^1.0.11",
86-
"standard": "^10.0.3",
87-
"style-loader": "^0.19.1",
90+
"standard": "^12.0.1",
91+
"style-loader": "^0.23.1",
8892
"typecheck": "^0.1.2",
8993
"uglify-js": "^3.3.7",
9094
"vue": "^2.2.6",
91-
"vue-loader": "^13.7.0",
92-
"webpack": "^3.10.0",
93-
"webpack-dev-server": "^2.11.0",
95+
"vue-loader": "^15.6.4",
96+
"vue-template-compiler": "^2.6.7",
97+
"webpack": "^4.29.5",
98+
"webpack-dev-server": "^3.2.1",
9499
"webpack-merge": "^4.1.1",
95100
"webpack-notifier": "^1.4.1"
96101
},
97-
"repository": {
98-
"type": "git",
99-
"url": "git+https://github.com/haozi/safe-trim.git"
100-
},
101-
"bugs": {
102-
"url": "https://github.com/haozi/safe-trim/issues"
103-
},
104-
"homepage": "https://github.com/haozi/safe-trim#readme"
102+
"ava": {
103+
"require": [
104+
"./test/helpers/setup-browser-env.js"
105+
]
106+
}
105107
}

0 commit comments

Comments
 (0)