lodash.startswith
Advanced tools
Comparing version 4.2.0 to 4.2.1
39
index.js
@@ -16,5 +16,3 @@ /** | ||
/** `Object#toString` result references. */ | ||
var funcTag = '[object Function]', | ||
genTag = '[object GeneratorFunction]', | ||
symbolTag = '[object Symbol]'; | ||
var symbolTag = '[object Symbol]'; | ||
@@ -50,3 +48,3 @@ /** Used to match leading and trailing whitespace. */ | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -105,29 +103,4 @@ */ | ||
/** | ||
* Checks if `value` is classified as a `Function` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @since 0.1.0 | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a function, else `false`. | ||
* @example | ||
* | ||
* _.isFunction(_); | ||
* // => true | ||
* | ||
* _.isFunction(/abc/); | ||
* // => false | ||
*/ | ||
function isFunction(value) { | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in Safari 8 which returns 'object' for typed array and weak map constructors, | ||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances. | ||
var tag = isObject(value) ? objectToString.call(value) : ''; | ||
return tag == funcTag || tag == genTag; | ||
} | ||
/** | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
@@ -249,3 +222,3 @@ * | ||
* **Note:** This method is loosely based on | ||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). | ||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). | ||
* | ||
@@ -310,3 +283,3 @@ * @static | ||
if (isObject(value)) { | ||
var other = isFunction(value.valueOf) ? value.valueOf() : value; | ||
var other = typeof value.valueOf == 'function' ? value.valueOf() : value; | ||
value = isObject(other) ? (other + '') : other; | ||
@@ -356,3 +329,3 @@ } | ||
* @category String | ||
* @param {string} [string=''] The string to search. | ||
* @param {string} [string=''] The string to inspect. | ||
* @param {string} [target] The string to search for. | ||
@@ -359,0 +332,0 @@ * @param {number} [position=0] The position to search from. |
{ | ||
"name": "lodash.startswith", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "The lodash method `_.startsWith` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.startswith v4.2.0 | ||
# lodash.startswith v4.2.1 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.startsWith` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.startswith) for more details. | ||
See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.startswith) for more details. |
11637
321