Skip to content

Commit

Permalink
update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
浩知 authored and haozi committed Oct 9, 2020
1 parent dd7557e commit ae4f2e9
Show file tree
Hide file tree
Showing 8 changed files with 9,414 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {getConfig, getGzipSize, red, blue, write, uglify, camelize} from './util'
import { getConfig, getGzipSize, red, blue, write, uglify, camelize } from './util'
import postcss from 'postcss'
import autoprefixer from 'autoprefixer'
import px2rem from 'postcss-px2rem'
Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
src/
test/
.nyc_output/
.script/
coverage/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# safe-trim
---

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

## install
```
Expand Down
28 changes: 14 additions & 14 deletions dist/safe-trim.common.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/*!
* safe-trim v1.0.15
* safe-trim v1.1.0
* (c) 2019 Jerry
* Released under the MIT License.
*/
function safeTrim (string) {
var SP = ' '; // common space
var TAB = '\t'; // tab
var CR = '\r'; // Carriage Return, Used as a new line character in Mac OS before X
var LF = '\n'; // Line Feed, Used as a new line character in Unix/Mac OS X
var CR_LF = '\r\n'; // Used as a new line character in Windows
var SP = ' ' // common space
var TAB = '\t' // tab
var CR = '\r' // Carriage Return, Used as a new line character in Mac OS before X
var LF = '\n' // Line Feed, Used as a new line character in Unix/Mac OS X
var CR_LF = '\r\n' // Used as a new line character in Windows
var ZERO_WIDTH_SPACE = '\v' + // \x0B VT 垂直制表符
'\f' + // \x0C FF 换页符
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D';
'\u200B\u200C\u200D\u200E\u200F\u000b\u2028\u2029\uFEFF\u202D'
var OTHER_SPACE =
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
'\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000'

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

var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')

return (string + '')
.replace(leftReg, '') // trim left
Expand All @@ -33,4 +33,4 @@ function safeTrim (string) {
.trim() // safety
}

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

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

var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')

return (string + '')
.replace(leftReg, '') // trim left
Expand All @@ -33,4 +33,4 @@ function safeTrim (string) {
.trim() // safety
}

export default safeTrim;
export default safeTrim;
34 changes: 17 additions & 17 deletions dist/safe-trim.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
/*!
* safe-trim v1.0.15
* safe-trim v1.1.0
* (c) 2019 Jerry
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.safeTrim = factory());
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.safeTrim = factory());
}(this, (function () {

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

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

var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"));
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"));
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g');
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g');
var leftReg = new RegExp(("^[" + ALL_SPACE + "]+"))
var rightReg = new RegExp(("[" + ALL_SPACE + "]+$"))
var zeroReg = new RegExp(("[" + ZERO_WIDTH_SPACE + "]+"), 'g')
var otherReg = new RegExp(("[" + OTHER_SPACE + "]+"), 'g')

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

return safeTrim;

})));
})));
116 changes: 59 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,105 +1,107 @@
{
"name": "safe-trim",
"version": "1.0.15",
"version": "1.1.0",
"description": "trim sting and remove zero-width-space in content",
"keywords": [
"no-break",
"safeTrim",
"space",
"spaces",
"trim",
"unicode",
"zero-width-space"
],
"homepage": "https://github.com/aligay/safe-trim#readme",
"bugs": {
"url": "https://github.com/aligay/safe-trim/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/aligay/safe-trim.git"
},
"license": "MIT",
"author": "Jerry",
"contributors": [
"Jerry"
],
"main": "dist/safe-trim.common.js",
"module": "dist/safe-trim.es.js",
"scripts": {
"start": "npm run dev",
"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",
"babel-node": "babel-node --presets es2015,es2016,es2017 --plugins transform-runtime",
"build": "npm run clear && cross-env NODE_ENV=production npm run lint && npm run babel-node .config/rollup.config.js",
"lint": "eslint --ext .js,.vue src .config .script test/*_spec.js",
"clear": "rimraf dist .nyc_output coverage; mkdirp dist",
"prepublish": "npm run test",
"babel-node": "babel-node --presets es2015,es2016,es2017 --plugins transform-runtime",
"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",
"fix": "standard src/**/*.js --fix >/dev/null 2>&1",
"test": "npm run build && npm run jasmine",
"jasmine": "istanbul cover jasmine-node spec"
"jasmine": "istanbul cover jasmine-node spec",
"lint": "eslint --ext .js,.vue src .config scripts spec/*_spec.js",
"prepublish": "npm run test",
"start": "npm run dev",
"test": "npm run build && npm run jasmine"
},
"config": {
"ghooks": {
"pre-commit": "cross-env NODE_ENV=production node scripts/checkVersion.js && npm run lint && npm run test",
"pre-push": "git status"
}
},
"ava": {
"require": [
"./test/helpers/setup-browser-env.js"
]
},
"keywords": [
"safeTrim",
"trim",
"unicode",
"spaces",
"no-break",
"space",
"zero-width-space",
"space"
],
"license": "MIT",
"devDependencies": {
"autoprefixer": "^7.2.5",
"ava": "^0.24.0",
"autoprefixer": "^9.4.9",
"ava": "^1.2.1",
"babel-cli": "^6.24.0",
"babel-eslint": "^8.2.1",
"babel-eslint": "^10.0.1",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2016": "^6.24.1",
"babel-preset-es2017": "^6.24.1",
"browser-env": "^3.2.4",
"compare-versions": "^3.0.0",
"cross-env": "^5.1.3",
"css-loader": "^0.28.8",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.6.1",
"css-loader": "^2.1.0",
"eslint": "^5.14.1",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-flow-vars": "^0.5.0",
"eslint-plugin-html": "^4.0.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-html": "^5.0.3",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"ghooks": "^2.0.2",
"gzip-size": "^4.1.0",
"gzip-size": "^5.0.0",
"istanbul": "^0.4.5",
"jasmine-node": "^1.14.5",
"less": "^2.7.1",
"less": "^3.9.0",
"less-loader": "^4.0.5",
"mkdirp": "^0.5.1",
"nyc": "^11.4.1",
"postcss-loader": "^2.0.10",
"nyc": "^13.3.0",
"postcss-loader": "^3.0.0",
"postcss-px2rem": "^0.3.0",
"rimraf": "^2.5.4",
"rollup-loader": "^0.3.0",
"rollup-plugin-buble": "^0.18.0",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-buble": "^0.19.6",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-less": "^0.1.1",
"rollup-plugin-node-resolve": "^3.0.2",
"rollup-plugin-node-resolve": "^4.0.1",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"rollup-plugin-vue": "^3.0.0",
"rollup-plugin-uglify": "^6.0.2",
"rollup-plugin-vue": "^4.7.2",
"safe-trim": "^1.0.11",
"standard": "^10.0.3",
"style-loader": "^0.19.1",
"standard": "^12.0.1",
"style-loader": "^0.23.1",
"typecheck": "^0.1.2",
"uglify-js": "^3.3.7",
"vue": "^2.2.6",
"vue-loader": "^13.7.0",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.11.0",
"vue-loader": "^15.6.4",
"vue-template-compiler": "^2.6.7",
"webpack": "^4.29.5",
"webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.1.1",
"webpack-notifier": "^1.4.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/haozi/safe-trim.git"
},
"bugs": {
"url": "https://github.com/haozi/safe-trim/issues"
},
"homepage": "https://github.com/haozi/safe-trim#readme"
"ava": {
"require": [
"./test/helpers/setup-browser-env.js"
]
}
}
Loading

0 comments on commit ae4f2e9

Please sign in to comment.