COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221621/https://github.com/lodash/lodash/blob/master/lowerCase.js
Permalink
Cannot retrieve contributors at this time
31 lines (28 sloc)
752 Bytes
import words from './words.js'
import toString from './toString.js'
const reQuotes = /[ '\u 2019] /g
/**
* Converts `string`, as space separated words, to lower case.
*
* @since 4.0.0
* @category String
* @param {string } [string=''] The string to convert.
* @returns {string } Returns the lower cased string.
* @see camelCase, kebabCase, snakeCase, startCase, upperCase, upperFirst
* @example
*
* lowerCase('--Foo-Bar--')
* // => 'foo bar'
*
* lowerCase('fooBar')
* // => 'foo bar'
*
* lowerCase('__FOO_BAR__')
* // => 'foo bar'
*/
const lowerCase = ( string ) => (
words ( toString ( string ) . replace ( reQuotes , '' ) ) . reduce ( ( result , word , index ) => (
result + ( index ? ' ' : '' ) + word . toLowerCase ( )
) , '' )
)
export default lowerCase
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.