DefinitelyTyped/types/center-align/center-align-tests.ts
Claas Ahlrichs 964c481dfd new package: center-align (#34203)
* npx dts-gen -m center-align --dt

* drafted types for center-align

* npx prettier --write .\types\center-align\**

* fixed linting issues
2019-03-25 15:19:58 -07:00

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 '