File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 11.DS_Store
2+ * .d.ts
23* .log
34.nyc_output /
45coverage /
Original file line number Diff line number Diff line change 1- // Remove final newline characters from `value`.
1+ /**
2+ * Remove final newline characters from `value`.
3+ *
4+ * @param {unknown } value Value with trailing line feeds, coerced to string.
5+ * @return {string } Value without trailing newlines.
6+ */
27export function trimTrailingLines ( value ) {
38 return String ( value ) . replace ( / \n + $ / , '' )
49}
Original file line number Diff line number Diff line change 2323 "sideEffects" : false ,
2424 "type" : " module" ,
2525 "main" : " index.js" ,
26+ "types" : " index.d.ts" ,
2627 "files" : [
28+ " index.d.ts" ,
2729 " index.js"
2830 ],
2931 "devDependencies" : {
30- "c8" : " ^7.6.0" ,
32+ "@types/tape" : " ^4.0.0" ,
33+ "c8" : " ^7.0.0" ,
3134 "prettier" : " ^2.0.0" ,
3235 "remark-cli" : " ^9.0.0" ,
3336 "remark-preset-wooorm" : " ^8.0.0" ,
37+ "rimraf" : " ^3.0.0" ,
3438 "tape" : " ^5.0.0" ,
39+ "typescript" : " ^4.0.0" ,
3540 "xo" : " ^0.38.0"
3641 },
3742 "scripts" : {
43+ "prepublishOnly" : " npm run build && npm run format" ,
44+ "prebuild" : " rimraf \" *.d.ts\" " ,
45+ "build" : " tsc" ,
3846 "format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
3947 "test-api" : " node test.js" ,
4048 "test-coverage" : " c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js" ,
41- "test" : " npm run format && npm run test-coverage"
49+ "test" : " npm run build && npm run format && npm run test-coverage"
4250 },
4351 "prettier" : {
4452 "tabWidth" : 2 ,
Original file line number Diff line number Diff line change 1+ {
2+ "files" : [" index.js" ],
3+ "include" : [" *.js" ],
4+ "compilerOptions" : {
5+ "target" : " ES2020" ,
6+ "lib" : [" ES2020" ],
7+ "module" : " ES2020" ,
8+ "moduleResolution" : " node" ,
9+ "allowJs" : true ,
10+ "checkJs" : true ,
11+ "declaration" : true ,
12+ "emitDeclarationOnly" : true ,
13+ "allowSyntheticDefaultImports" : true ,
14+ "skipLibCheck" : true
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments