diff --git a/index.d.ts b/index.d.ts index e152d7c..af1aed4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -16,7 +16,7 @@ Trim from the start and end of a string. @example ```js -import trimNewlines from 'trim-newlines'; +import {trimNewlines} from 'trim-newlines'; trimNewlines('\nšŸ¦„\nšŸ¦„\r\n'); //=> 'šŸ¦„\nšŸ¦„' @@ -29,9 +29,9 @@ Trim from the start of a string. @example ```js -import trimNewlines from 'trim-newlines'; +import {trimNewlinesStart} from 'trim-newlines'; -trimNewlines.start('\nšŸ¦„\r\n'); +trimNewlinesStart('\nšŸ¦„\r\n'); //=> 'šŸ¦„\r\n' ``` */ @@ -42,9 +42,9 @@ Trim from the end of a string. @example ```js -import trimNewlines from 'trim-newlines'; +import {trimNewlinesEnd} from 'trim-newlines'; -trimNewlines.end('\nšŸ¦„\r\n'); +trimNewlinesEnd('\nšŸ¦„\r\n'); //=> '\nšŸ¦„' ``` */ diff --git a/package.json b/package.json index 7edde50..028538a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "type": "module", "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=14.16" }, "scripts": { "test": "xo && ava && tsd" diff --git a/readme.md b/readme.md index 0fb6ea3..8b65332 100644 --- a/readme.md +++ b/readme.md @@ -6,8 +6,8 @@ Looking to trim all whitespace, not just newlines? Use `String#trim()`, `String# ## Install -``` -$ npm install trim-newlines +```sh +npm install trim-newlines ``` ## Usage @@ -38,15 +38,3 @@ Trim from the start of a string. ### trimNewlinesEnd(string) Trim from the end of a string. - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-