Comparing version 2.0.1 to 2.1.0
{ | ||
"name": "table", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Formats data into a string table.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -16,3 +16,3 @@ # Table | ||
[!Demo of Table displaying a list of missions to Moon](./README/demo.png) | ||
![Demo of Table displaying a list of missions to Moon](./README/demo.png) | ||
@@ -207,2 +207,12 @@ ## Features | ||
โโโโดโโโดโโโ | ||
# ramac (ASCII; for use in terminals that do not support Unicode characters) | ||
+--+--+--+ | ||
|0A|0B|0C| | ||
|--|--|--| | ||
|1A|1B|1C| | ||
|--|--|--| | ||
|2A|2B|2C| | ||
+--+--+--+ | ||
``` | ||
@@ -209,0 +219,0 @@ |
@@ -52,3 +52,26 @@ /** | ||
if (name === `ramac`) { | ||
return { | ||
topBody: `-`, | ||
topJoin: `+`, | ||
topLeft: `+`, | ||
topRight: `+`, | ||
bottomBody: `-`, | ||
bottomJoin: `+`, | ||
bottomLeft: `+`, | ||
bottomRight: `+`, | ||
bodyLeft: `|`, | ||
bodyRight: `|`, | ||
bodyJoin: `|`, | ||
joinBody: `-`, | ||
joinLeft: `|`, | ||
joinRight: `|`, | ||
joinJoin: `|` | ||
}; | ||
} | ||
throw new Error(`Unknown border template "${name}".`); | ||
}; |
@@ -69,2 +69,21 @@ import { | ||
it(`draws expected table (ramac)`, () => { | ||
let output; | ||
output = table(data, { | ||
border: border(`ramac`) | ||
}); | ||
// console.log(output); | ||
expectTable(output, ` | ||
+--+--+--+ | ||
|0A|0B|0C| | ||
|--|--|--| | ||
|1A|1B|1C| | ||
|--|--|--| | ||
|2A|2B|2C| | ||
+--+--+--+ | ||
`); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
336117
2426
390