sindresorhus / trim-newlines
Trim newlines from the start and/or end of a string
☆48Updated last year
Related projects ⓘ
Alternatives and complementary repositories for trim-newlines
- Strip redundant indentation and indent the string☆54Updated 3 years ago
- Create an array with values that are present in the first input array but not additional ones☆38Updated 3 years ago
- Strip the final newline character from a string/buffer☆33Updated last week
- Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`☆45Updated 7 months ago
- Truncate a semver version: 1.2.3 → 1.2.0☆17Updated 2 years ago
- Turn an object into a string of HTML attributes☆49Updated last year
- Lowercase the keys of an object☆40Updated last year
- Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Ex…☆23Updated 7 years ago
- Repeat a string - fast☆34Updated 3 years ago
- Gracefully restore the CLI cursor on exit☆35Updated 3 months ago
- Get metadata on the default editor or a specific editor☆53Updated last year
- Parse/stringify contact info like `Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)`☆34Updated 3 years ago
- A list of directories you should ignore by default☆23Updated 2 years ago
- The Node.js `util.deprecate()` function with browser support☆38Updated 5 years ago
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost`☆62Updated 3 years ago
- Check if your code is running as an npm or yarn script☆64Updated 3 years ago
- Filter object keys and values into a new object☆100Updated 5 months ago
- Returns an array filled with the specified input☆43Updated 2 years ago
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆36Updated 2 years ago
- A better `Promise.race()`☆46Updated last year
- Detect the dominant newline character of a string☆55Updated last year
- Returns the directory used by NPM for globally installed NPM packages.☆35Updated 5 years ago
- Get an array of valid, sorted, and cleaned semver versions from an array of strings☆40Updated 3 years ago
- Check if a string is a scoped npm package name☆24Updated 2 years ago
- Mimic a Node.js HTTP response stream☆59Updated last year
- Check if a file path is a compressed file☆16Updated 6 months ago
- Returns an array with only the unique values from all given arrays using strict equality for comparisons.☆46Updated 2 years ago
- Check if a path is inside another path☆37Updated 2 years ago
- Check if a string matches the name of a Node.js builtin module☆58Updated 6 months ago
- Split a string at one or more indices☆23Updated 3 years ago