diff --git a/README.md b/README.md index 3616dcc55..2cb25907c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.10.2 +# lodash v3.10.3 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash.ceil/README.md b/lodash.ceil/README.md index 7dd27eb88..b4beb23bc 100644 --- a/lodash.ceil/README.md +++ b/lodash.ceil/README.md @@ -1,4 +1,4 @@ -# lodash.ceil v3.10.2 +# lodash.ceil v3.10.3 The [lodash](https://lodash.com/) method `_.ceil` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var ceil = require('lodash.ceil'); ``` -See the [documentation](https://lodash.com/docs#ceil) or [package source](https://github.com/lodash/lodash/blob/3.10.2-npm-packages/lodash.ceil) for more details. +See the [documentation](https://lodash.com/docs#ceil) or [package source](https://github.com/lodash/lodash/blob/3.10.3-npm-packages/lodash.ceil) for more details. diff --git a/lodash.ceil/index.js b/lodash.ceil/index.js index 422ee03ed..2ff8fa07b 100644 --- a/lodash.ceil/index.js +++ b/lodash.ceil/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.10.2 (Custom Build) + * lodash 3.10.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -29,11 +29,54 @@ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; -/** Built-in method references without a dependency on `global`. */ +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + /** Used for built-in method references. */ -var objectProto = global.Object.prototype; +var objectProto = Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) @@ -42,7 +85,7 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var Symbol = global.Symbol; +var Symbol = root.Symbol; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, diff --git a/lodash.ceil/package.json b/lodash.ceil/package.json index 7718bf48f..5085780e7 100644 --- a/lodash.ceil/package.json +++ b/lodash.ceil/package.json @@ -1,11 +1,11 @@ { "name": "lodash.ceil", - "version": "3.10.2", + "version": "3.10.3", "description": "The lodash method `_.ceil` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, ceil", + "keywords": "lodash-modularized, ceil", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.floor/README.md b/lodash.floor/README.md index 73260037c..3860cf4c1 100644 --- a/lodash.floor/README.md +++ b/lodash.floor/README.md @@ -1,4 +1,4 @@ -# lodash.floor v3.10.2 +# lodash.floor v3.10.3 The [lodash](https://lodash.com/) method `_.floor` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var floor = require('lodash.floor'); ``` -See the [documentation](https://lodash.com/docs#floor) or [package source](https://github.com/lodash/lodash/blob/3.10.2-npm-packages/lodash.floor) for more details. +See the [documentation](https://lodash.com/docs#floor) or [package source](https://github.com/lodash/lodash/blob/3.10.3-npm-packages/lodash.floor) for more details. diff --git a/lodash.floor/index.js b/lodash.floor/index.js index c4a2c80fb..0ff7288cd 100644 --- a/lodash.floor/index.js +++ b/lodash.floor/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.10.2 (Custom Build) + * lodash 3.10.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -29,11 +29,54 @@ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; -/** Built-in method references without a dependency on `global`. */ +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + /** Used for built-in method references. */ -var objectProto = global.Object.prototype; +var objectProto = Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) @@ -42,7 +85,7 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var Symbol = global.Symbol; +var Symbol = root.Symbol; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, diff --git a/lodash.floor/package.json b/lodash.floor/package.json index ba97695f0..3f827e74d 100644 --- a/lodash.floor/package.json +++ b/lodash.floor/package.json @@ -1,11 +1,11 @@ { "name": "lodash.floor", - "version": "3.10.2", + "version": "3.10.3", "description": "The lodash method `_.floor` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, floor", + "keywords": "lodash-modularized, floor", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.round/README.md b/lodash.round/README.md index af3ecea2e..601d84636 100644 --- a/lodash.round/README.md +++ b/lodash.round/README.md @@ -1,4 +1,4 @@ -# lodash.round v3.10.2 +# lodash.round v3.10.3 The [lodash](https://lodash.com/) method `_.round` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var round = require('lodash.round'); ``` -See the [documentation](https://lodash.com/docs#round) or [package source](https://github.com/lodash/lodash/blob/3.10.2-npm-packages/lodash.round) for more details. +See the [documentation](https://lodash.com/docs#round) or [package source](https://github.com/lodash/lodash/blob/3.10.3-npm-packages/lodash.round) for more details. diff --git a/lodash.round/index.js b/lodash.round/index.js index b8e2760e9..c7f6ce816 100644 --- a/lodash.round/index.js +++ b/lodash.round/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.10.2 (Custom Build) + * lodash 3.10.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -29,11 +29,54 @@ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; -/** Built-in method references without a dependency on `global`. */ +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + /** Used for built-in method references. */ -var objectProto = global.Object.prototype; +var objectProto = Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) @@ -42,7 +85,7 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var Symbol = global.Symbol; +var Symbol = root.Symbol; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, diff --git a/lodash.round/package.json b/lodash.round/package.json index de00437cb..f957d3239 100644 --- a/lodash.round/package.json +++ b/lodash.round/package.json @@ -1,11 +1,11 @@ { "name": "lodash.round", - "version": "3.10.2", + "version": "3.10.3", "description": "The lodash method `_.round` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, round", + "keywords": "lodash-modularized, round", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)",