+4
-21
@@ -1,30 +0,13 @@ | ||
| /** | ||
| * @author Titus Wormer | ||
| * @copyright 2015 Titus Wormer | ||
| * @license MIT | ||
| * @module detab | ||
| * @fileoverview Detab: tabs -> spaces. | ||
| */ | ||
| 'use strict'; | ||
| /* Expose. */ | ||
| module.exports = detab; | ||
| /* Dependencies. */ | ||
| var repeat = require('repeat-string'); | ||
| /* Constants. */ | ||
| var TAB = 0x09; | ||
| var LF = 0x0a; | ||
| var CR = 0x0d; | ||
| var LF = 0x0A; | ||
| var CR = 0x0D; | ||
| /** | ||
| * Replace tabs with spaces, being smart about which | ||
| * column the tab is at and which size should be used. | ||
| * | ||
| * @param {string} value - Value with tabs. | ||
| * @param {number?} [size=4] - Tab-size. | ||
| * @return {string} - Value without tabs. | ||
| */ | ||
| /* Replace tabs with spaces, being smart about which | ||
| * column the tab is at and which size should be used. */ | ||
| function detab(value, size) { | ||
@@ -31,0 +14,0 @@ var string = typeof value === 'string'; |
+18
-30
| { | ||
| "name": "detab", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "description": "Detab: tabs -> spaces", | ||
@@ -13,2 +13,8 @@ "license": "MIT", | ||
| ], | ||
| "repository": "wooorm/detab", | ||
| "bugs": "https://github.com/wooorm/detab/issues", | ||
| "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
| "contributors": [ | ||
| "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)" | ||
| ], | ||
| "files": [ | ||
@@ -20,22 +26,13 @@ "index.js" | ||
| }, | ||
| "repository": "https://github.com/wooorm/detab", | ||
| "bugs": "https://github.com/wooorm/detab/issues", | ||
| "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
| "contributors": [ | ||
| "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)" | ||
| ], | ||
| "devDependencies": { | ||
| "browserify": "^13.0.1", | ||
| "browserify": "^14.0.0", | ||
| "esmangle": "^1.0.1", | ||
| "nyc": "^7.0.0", | ||
| "remark-cli": "^1.0.0", | ||
| "remark-comment-config": "^4.0.0", | ||
| "remark-github": "^5.0.0", | ||
| "remark-lint": "^4.0.0", | ||
| "remark-validate-links": "^4.0.0", | ||
| "nyc": "^11.0.0", | ||
| "remark-cli": "^4.0.0", | ||
| "remark-preset-wooorm": "^3.0.0", | ||
| "tape": "^4.0.0", | ||
| "xo": "^0.16.0" | ||
| "xo": "^0.18.0" | ||
| }, | ||
| "scripts": { | ||
| "build-md": "remark . --quiet --frail", | ||
| "build-md": "remark . -qfo", | ||
| "build-bundle": "browserify index.js --bare -s detab > detab.js", | ||
@@ -51,21 +48,12 @@ "build-mangle": "esmangle detab.js > detab.min.js", | ||
| "space": true, | ||
| "esnext": false, | ||
| "ignores": [ | ||
| "detab.js", | ||
| "detab.min.js" | ||
| "detab.js" | ||
| ] | ||
| }, | ||
| "remarkConfig": { | ||
| "output": true, | ||
| "plugins": { | ||
| "comment-config": null, | ||
| "github": null, | ||
| "lint": { | ||
| "heading-increment": false | ||
| }, | ||
| "validate-links": null | ||
| }, | ||
| "settings": { | ||
| "bullet": "*" | ||
| } | ||
| "plugins": [ | ||
| "preset-wooorm" | ||
| ] | ||
| } | ||
| } |
+5
-20
| # detab [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
| Detab: tabs -> spaces. | ||
| Detab: tabs → spaces. | ||
| ## Installation | ||
| [npm][npm-install]: | ||
| [npm][]: | ||
@@ -15,11 +15,5 @@ ```bash | ||
| Dependencies. | ||
| ```javascript | ||
| var detab = require('detab'); | ||
| ``` | ||
| Detab: | ||
| ```javascript | ||
| var four = detab('\tfoo\nbar\tbaz'); | ||
@@ -51,14 +45,5 @@ var two = detab('\tfoo\nbar\tbaz', 2); | ||
| Replace tabs with spaces, being smart about which column the tab is at | ||
| and which size should be used. | ||
| Replace tabs with spaces in `value` (`string`), being smart about which | ||
| column the tab is at and which `size` (`number`, default: `4`) should be used. | ||
| ###### Parameters | ||
| * `value` (`string`) — Value with tabs; | ||
| * `size` (`number`, default: `4`) — Tab-size. | ||
| ###### Returns | ||
| `string` — Value without tabs | ||
| ## License | ||
@@ -78,3 +63,3 @@ | ||
| [npm-install]: https://docs.npmjs.com/cli/install | ||
| [npm]: https://docs.npmjs.com/cli/install | ||
@@ -81,0 +66,0 @@ [license]: LICENSE |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
7
-30%4444
-15.43%37
-30.19%66
-18.52%