mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* npx dts-gen -m center-align --dt * drafted types for center-align * npx prettier --write .\types\center-align\** * fixed linting issues
18 lines
441 B
TypeScript
18 lines
441 B
TypeScript
import center from "center-align";
|
|
|
|
// multi-line sample
|
|
center([
|
|
"Lorem ipsum dolor sit amet,",
|
|
"consectetur adipiscing",
|
|
"elit, sed do eiusmod tempor incididunt",
|
|
"ut labore et dolore",
|
|
"magna aliqua. Ut enim ad minim",
|
|
"veniam, quis"
|
|
]);
|
|
|
|
// single-line samples
|
|
center("foo"); // => 'foo' (does nothing)
|
|
center("foo", 12); // => ' foo '
|
|
center("foo", 10); // => ' foo '
|
|
center("foo", 8); // => ' foo '
|