{"_id":"@1-week/doctor-jones","_rev":"1-818c54ce79e4535184e0720b547c75bc","name":"@1-week/doctor-jones","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.2":{"name":"@1-week/doctor-jones","version":"1.0.2","description":"After all, we should all respect w3c/clreq","main":"dist/index.cjs.js","typings":"index.d.ts","scripts":{"dev":"cross-env NODE_ENV=dev rollup --watch -c","build":"rimraf dist && cross-env NODE_ENV=prod rollup -c","test":"nyc ava -v && nyc report --reporter=html","docs:dev":"vuepress dev docs","docs:build":"vuepress build docs","docs:pub":"sh scripts/doc.sh","pub":"sh scripts/release.sh"},"ava":{"require":["esm"]},"bin":{"doctor-jones":"bin/dj"},"repository":{"type":"git","url":"git+https://github.com/Leopoldthecoder/doctor-jones.git"},"author":{"name":"Leopoldthecoder"},"license":"MIT","bugs":{"url":"https://github.com/Leopoldthecoder/doctor-jones/issues"},"homepage":"https://github.com/Leopoldthecoder/doctor-jones#readme","dependencies":{"update-notifier":"^3.0.0","yargonaut":"^1.1.4","yargs":"^13.2.4"},"devDependencies":{"@vuepress/plugin-google-analytics":"^1.0.1","ava":"^1.0.1","chinese-random-name":"^1.0.0","conventional-changelog-cli":"^2.0.11","coveralls":"^3.0.4","cross-env":"^5.2.0","eslint-config-doran":"^1.0.8","esm":"^3.0.84","nyc":"^14.1.1","prettier":"^1.15.3","rimraf":"^2.6.3","rollup":"^1.0.1","rollup-plugin-buble":"^0.19.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-eslint":"^5.0.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","vuepress":"^1.0.1"},"gitHead":"f66a400fc5711626d12f85879b9b0535e2a2ff35","_id":"@1-week/doctor-jones@1.0.2","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-ZesO3WNkalVsA23ieFWj9pSbBNN/f26pGKJNSCILJ82Nh2SpRX1m4TKIQ/DT1L5G/m13wAdH8VLRCdhrD+E6AA==","shasum":"e7c5cb26571271ef69e214cb755c7d5a964cf204","tarball":"https://registry.npmjs.org/@1-week/doctor-jones/-/doctor-jones-1.0.2.tgz","fileCount":14,"unpackedSize":91610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoLCqZiChohQHtphZSicg4RB9yQQ6tzLRlj0SyF5NXNgIhANKnChnuLZlgBgbsyiDh64jxnzhqX7iYv1RCBpRmhHF9"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiprYpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWtRAAowHZvVbnpG8ZLT/7k8OLTTsG+opxTPWNLdG5TP2/gf37ZHsW\r\n3wrYQjZma5b0SCrB4ZFUe31ROknwUB0fM2C0tn1SkAORNYDF3XtPBAtnZnpp\r\nCnEOt9pXkbQ+VkMJqtHNdm5ygK5+tabpVwTlOSxujCpQYsEV2aAMc1WcQI2X\r\nQtvr/ZiMLnwCm+PgpvqjsytBpjgHDNcgTyQHc2P8NynEqYLEBPaVl6wv72CM\r\nfG/dgMcvnM+0o18WBZ/h8358I2NaMlSVJupBQHb03yrlDtHw0ieVFYQGwGPU\r\n4aPqRSAW2OZ5biOBMJcPX/Um8NLCI8FFx8S5kNzdyo1p8gU+GFcfm+I1IEow\r\nIu9Mzo0TRyTn0/fimCaCVxIeswCYmX8qNXPFGX5g1gN/bh6ZGux8P0fgYLr5\r\nYvYfztnCFCjexBaIGXdbD1bav5pXqYvLXreCSXsqYsaa8hAw2raOJ5olPfHW\r\n+7/bubFvu94PtZeNwfLp6gfpXPVhjQbdQiB//ULiFAH99TEW0qqMLgrf4BHk\r\nGXWGy5BGJAwTJGdohcT4jmNg+4rwhwl/8jm7XNEt9QtU7u4h+3HZWjkf/B+m\r\nUed1d4XvPZrLWv95IgRQMsbzlwy6GqzJVzGUrYqjni2IKV6Wjs9Z7YUa5BiD\r\newnBUi2oiakJyqiUTtOyFSq/rKBNd1D6CEU=\r\n=DzZI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1-week","email":"bayeszou@gmail.com"},"directories":{},"maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/doctor-jones_1.0.2_1655092776848_0.8072223011401973"},"_hasShrinkwrap":false},"1.0.3":{"name":"@1-week/doctor-jones","version":"1.0.3","description":"After all, we should all respect w3c/clreq","main":"dist/index.cjs.js","typings":"index.d.ts","scripts":{"dev":"cross-env NODE_ENV=dev rollup --watch -c","build":"rimraf dist && cross-env NODE_ENV=prod rollup -c","test":"nyc ava -v && nyc report --reporter=html","docs:dev":"vuepress dev docs","docs:build":"vuepress build docs","docs:pub":"sh scripts/doc.sh","pub":"sh scripts/release.sh"},"ava":{"require":["esm"]},"bin":{"doctor-jones":"bin/dj"},"repository":{"type":"git","url":"git+https://github.com/Leopoldthecoder/doctor-jones.git"},"author":{"name":"Leopoldthecoder"},"license":"MIT","bugs":{"url":"https://github.com/Leopoldthecoder/doctor-jones/issues"},"homepage":"https://github.com/Leopoldthecoder/doctor-jones#readme","dependencies":{"update-notifier":"^3.0.0","yargonaut":"^1.1.4","yargs":"^13.2.4"},"devDependencies":{"@vuepress/plugin-google-analytics":"^1.0.1","ava":"^1.0.1","chinese-random-name":"^1.0.0","conventional-changelog-cli":"^2.0.11","coveralls":"^3.0.4","cross-env":"^5.2.0","eslint-config-doran":"^1.0.8","esm":"^3.0.84","nyc":"^14.1.1","prettier":"^1.15.3","rimraf":"^2.6.3","rollup":"^1.0.1","rollup-plugin-buble":"^0.19.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-eslint":"^5.0.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","vuepress":"^1.0.1"},"gitHead":"f66a400fc5711626d12f85879b9b0535e2a2ff35","_id":"@1-week/doctor-jones@1.0.3","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-j9N9R3EzUfiOK0CrTT3IIQuz9crZQGgLB9p7LM409U1GjY7sbgyZlDvBpCvWrRqicPYRixFHf6J2naWAa8QUhA==","shasum":"3a1c2f9c0d1e3a27f41e2b6d511995d038789baa","tarball":"https://registry.npmjs.org/@1-week/doctor-jones/-/doctor-jones-1.0.3.tgz","fileCount":18,"unpackedSize":127301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIES/IXjBivyFkGdkZtkUr79EEFgqMKK6ghqVEo5Z5WImAiEAmfE/C2ZGptHiUwRnLiARzb/Y/dJYguvjhlW8oahAl7w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiprf9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfGg//Xhr7gZJX0hMSjkrXDU7bb+OiOtRsvoX3HroX2ZJtGICQFwcd\r\nGYaOnRIbK4fJgH87NGodG/eO39DhqnmqXcRKFOaMRpfZHDCOlO8D4VvJG8MH\r\nRQhXN5LSEw50cFEEX5CAu80qxnUR5OByqbtfUi9Yf+pEUi0SGz95Q3nx4csL\r\n6TFuoAbSGQd0HoSuMXLJaRxbh0mPlBuXD0u1Oz+ke/lH7jlUaYCAsyCDV8L6\r\ntlSWIJagFE6RTgSW6JlfDjSe+eQleh/YqBWSnD5jUWzRBl/aIax1w1jfXliW\r\nYvOFkenEKg5Kyixt3nhFvehKJYlhuAeucBqBJxkvFWIkYOWMX5x8OsXZ7rU5\r\nH8X4VX3ZLVOFp4HQtR0c1XpwLKBrFeKhHGRzrUwF+t84X6rAQ4P4wohSJITA\r\nEByEyRnEhax3avEGXAHSq1aKIjDgpYj7Lkcl122N49azNctCh0vb59TTndjC\r\n69wBKOpv/SsxE0ivWfl2mTFCEgCh5T6pSm3c2kn10Uf6xggFiJPE70QiUElc\r\n6OSTfNXrupawtWrpbNkIWFvgyQyCDb3p6mE5GGjDKMB004c28tppbGPLFc86\r\nWDOvEmp45T3qcTSn8+9exski16rgDEA9LbA3T3bOXlur++2K6tBIVT2fw6mM\r\nEwCuvTRA0kQJ4VCDwrlnFhmMzuh1Ff0Q4Lc=\r\n=hhC+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1-week","email":"bayeszou@gmail.com"},"directories":{},"maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/doctor-jones_1.0.3_1655093245426_0.5045008417994297"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-13T03:59:36.800Z","1.0.2":"2022-06-13T03:59:37.022Z","modified":"2022-06-13T04:07:25.671Z","1.0.3":"2022-06-13T04:07:25.599Z"},"maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"description":"After all, we should all respect w3c/clreq","homepage":"https://github.com/Leopoldthecoder/doctor-jones#readme","repository":{"type":"git","url":"git+https://github.com/Leopoldthecoder/doctor-jones.git"},"author":{"name":"Leopoldthecoder"},"bugs":{"url":"https://github.com/Leopoldthecoder/doctor-jones/issues"},"license":"MIT","readme":"# Doctor Jones\n> After all, we should all respect [w3c/clreq](https://github.com/w3c/clreq)\n\n<p align=\"center\">\n  <a href='https://app.codacy.com/app/Leopoldthecoder/doctor-jones?utm_source=github.com&utm_medium=referral&utm_content=Leopoldthecoder/doctor-jones&utm_campaign=Badge_Grade_Dashboard'><img src='https://img.shields.io/codacy/grade/f564214ac34442fca5809a557f0dd342.svg?style=for-the-badge' alt='Codacy grade' /></a>\n  <a href='https://coveralls.io/github/Leopoldthecoder/doctor-jones?branch=master'><img src='https://img.shields.io/coveralls/github/Leopoldthecoder/doctor-jones.svg?style=for-the-badge' alt='Coverage Status' /></a>\n  <a href='https://www.npmjs.com/package/doctor-jones'><img src='https://img.shields.io/bundlephobia/min/doctor-jones.svg?style=for-the-badge' alt='npm bundle size' /></a>\n  <a href='https://github.com/Leopoldthecoder/doctor-jones/blob/master/LICENSE'><img src='https://img.shields.io/npm/l/doctor-jones.svg?style=for-the-badge' alt='Liscense' /></a>\n  <br>\n  <br>\n  <br>\n  <br>\n  <img src=\"https://raw.githubusercontent.com/Leopoldthecoder/doctor-jones/master/media/logo.png\" height=\"200\">\n  <br>\n  <br>\n  <br>\n  <br>\n  <span>链接</span>\n  <br>\n  <a href='https://leopoldthecoder.github.io/doctor-jones/'>文档</a>\n  <span> · </span>\n  <a href='./README_EN.md'>English README</a>\n  <span> · </span>\n  <a href='https://www.npmjs.com/package/doctor-jones'>npm Page</a>\n  <br>\n  <br>\n  <span>相关项目</span>\n  <br>\n  <a href='https://github.com/Leopoldthecoder/doctor-jones-loader'>doctor-jones-loader</a>\n  <span> · </span>\n  <a href='https://github.com/Leopoldthecoder/doctor-jones-extension'>doctor-jones-extension</a>\n  <span> · </span>\n  <span>More to be developed...</span>\n</p>\n\n##\n\n### 介绍\n\n`doctor-jones` 是一个用来格式化中文字符串（包括中英文混排）的工具集，它基于 [w3c/clreq](https://github.com/w3c/clreq) 及其他中文排版最佳实践。作为一个工具集，`doctor-jones` 包括：\n\n* [x] 一个 [`npm` 包](https://www.npmjs.com/package/doctor-jones)，用于接收字符串，并返回格式化后的字符串\n* [x] 一个 [`webpack` loader](https://github.com/Leopoldthecoder/doctor-jones-loader)，用于格式化你的 `.js`, `.ts`, `.jsx`, `.tsx`, `.vue` 文件中的字符串\n* [x] 一个 [Chrome 插件](https://github.com/Leopoldthecoder/doctor-jones-extension)，用于格式化当前正在浏览的网页\n* [ ] 一个即开即用的网站，粘贴一段文本，得到格式化后的输出，即 `doctor-jones-as-a-service`，简称 `DJaaS`（计划中）\n\n使用 `doctor-jones` 可以做到以下格式化：\n\n* 中英文、中文与数字之间增加半角空格\n* 移除全角标点和英文/数字之间多余的半角空格\n* 移除多于一个的连续感叹号\n* 将省略号规范化为 `……`\n* 将引号 `“”` `‘’` 替换为 `「」` `『』`\n* 将纯数字周围的全角括号替换为半角括号\n\n需要注意的是，这些格式化只对至少包含一个中文字符或全角符号的字符串生效。同时，每个格式化选项都可以通过设置来关闭。\n\n### 安装\n\n#### CDN\n```html\n<script type=\"text/javascript\" src=\"https://unpkg.com/doctor-jones/dist/index.umd.min.js\"></script>\n```\n\n#### npm\n```bash\nnpm i doctor-jones -S\n```\n\n### 使用\n```js\n// 使用 CDN\nconst dj = window.dj\n\n// 使用 npm\nimport dj from 'doctor-jones'\n\ndj('doctor-jones是一个“治疗”中英文混排格式的工具') // 返回 'doctor-jones 是一个「治疗」中英文混排格式的工具'\n```\n\n### 格式化选项\n```js\ndj(\n  // 待格式化的字符串\n  'doctor-jones是一个“治疗”中英文混排格式的工具',\n  \n  // 格式化选项\n  {\n    // 是否在中文和字母数字之间添加空格\n    // 可选值：boolean\n    spacing: true,\n\n    // 是否允许在全角符号与字母数字之间存在空格  \n    // 可选值：boolean\n    spaceBetweenFullwidthPunctuationAndAlphabets: false,\n\n    // 是否允许连续的感叹号  \n    // 可选值：boolean\n    successiveExclamationMarks: false,\n  \n    // 省略号规范化规则\n    // 可选值：'none' | '3dots' | 'all'\n    // 'none'：将连续出现两次或以上的 。、，. 规范化为 ……\n    // '3dots'：除 ... 以外，将连续出现两次或以上的 。、，. 规范化为 ……\n    // 'all'：不进行省略号规范化\n    ellipsisTolerance: 'none',\n  \n    // 弯引号替换规则\n    // 可选值：'double' | 'single' | 'none'\n    // 'double'：使用直角引号「」替换弯引号“”，同时使用直角引号『』替换弯引号‘’\n    // 'single'：使用直角引号「」替换弯引号‘’，同时使用直角引号『』替换弯引号“”\n    // 'none'：不替换弯引号\n    replaceWithCornerQuotes: 'double',\n\n    // 是否在数字周围使用半角括号  \n    // 可选值：boolean\n    halfwidthParenthesisAroundNumbers: true\n  }\n)\n```\n\n### CLI\n\n全局安装 doctor-jones，即可在终端中使用：\n\n```bash\nnpm i doctor-jones -g\n```\n\n```shell\n$ doctor-jones --help\n\nFormat Options\n  --spacing, -s          是否在中文和字母数字之间添加空格                  [boolean]\n  --space-between, --sb  是否允许在全角符号与字母数字之间存在空格           [boolean]\n  --exclamation, --ex    是否允许连续的感叹号                            [boolean]\n  --ellipsis, --el       省略号规范化规则       [choices: \"none\", \"3dots\", \"all\"]\n  --quote, -q            弯引号替换规则     [choices: \"none\", \"double\", \"single\"]\n  --parenthesis, -p      是否在数字周围使用半角括号                       [boolean]\n\nOptions:\n  --help, -h     帮助信息                                              [boolean]\n  --version, -v  当前版本                                              [boolean]\n\nExamples:\n    doctor-jones 需要格式化的字符串\n    doctor-jones -s false 需要格式化的字符串\n    doctor-jones -s false --el 3dots 需要格式化的字符串\n```\n\n### 感谢\n- [pangu.js](https://github.com/vinta/pangu.js)\n- [syntax-parser](https://github.com/ascoders/syntax-parser)\n- [ElemeFE Style Guide](https://github.com/ElemeFE/style-guide/blob/master/copywriter.md)\n","readmeFilename":"README.md"}