to-string-tag-x
Advanced tools
Comparing version
29
index.js
/** | ||
* @file | ||
* <a href="https://travis-ci.org/Xotic750/to-string-tag-x" | ||
* title="Travis status"> | ||
* <img src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master" | ||
* alt="Travis status" height="18"> | ||
* </a> | ||
* <a href="https://david-dm.org/Xotic750/to-string-tag-x" | ||
* title="Dependency status"> | ||
* <img src="https://david-dm.org/Xotic750/to-string-tag-x.svg" | ||
* alt="Dependency status" height="18"/> | ||
* </a> | ||
* <a href="https://david-dm.org/Xotic750/to-string-tag-x#info=devDependencies" | ||
* title="devDependency status"> | ||
* <img src="https://david-dm.org/Xotic750/to-string-tag-x/dev-status.svg" | ||
* alt="devDependency status" height="18"/> | ||
* </a> | ||
* <a href="https://badge.fury.io/js/to-string-tag-x" title="npm version"> | ||
* <img src="https://badge.fury.io/js/to-string-tag-x.svg" | ||
* alt="npm version" height="18"> | ||
* </a> | ||
* | ||
* Get an object's ES6 @@toStringTag. | ||
* | ||
* Requires ES3 or above. | ||
* | ||
* @file Get an object's ES6 @@toStringTag. | ||
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )} | ||
* | ||
* @version 1.3.0 | ||
* @version 1.4.0 | ||
* @author Xotic750 <Xotic750@gmail.com> | ||
@@ -31,0 +6,0 @@ * @copyright Xotic750 |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ | ||
/** | ||
* @file | ||
* <a href="https://travis-ci.org/Xotic750/to-string-tag-x" | ||
* title="Travis status"> | ||
* <img src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master" | ||
* alt="Travis status" height="18"> | ||
* </a> | ||
* <a href="https://david-dm.org/Xotic750/to-string-tag-x" | ||
* title="Dependency status"> | ||
* <img src="https://david-dm.org/Xotic750/to-string-tag-x.svg" | ||
* alt="Dependency status" height="18"/> | ||
* </a> | ||
* <a href="https://david-dm.org/Xotic750/to-string-tag-x#info=devDependencies" | ||
* title="devDependency status"> | ||
* <img src="https://david-dm.org/Xotic750/to-string-tag-x/dev-status.svg" | ||
* alt="devDependency status" height="18"/> | ||
* </a> | ||
* <a href="https://badge.fury.io/js/to-string-tag-x" title="npm version"> | ||
* <img src="https://badge.fury.io/js/to-string-tag-x.svg" | ||
* alt="npm version" height="18"> | ||
* </a> | ||
* | ||
* Get an object's ES6 @@toStringTag. | ||
* | ||
* Requires ES3 or above. | ||
* | ||
* @file Get an object's ES6 @@toStringTag. | ||
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )} | ||
* | ||
* @version 1.3.0 | ||
* @version 1.4.0 | ||
* @author Xotic750 <Xotic750@gmail.com> | ||
@@ -32,0 +7,0 @@ * @copyright Xotic750 |
@@ -1,1 +0,10 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=e()}}(function(){return function e(n,t,o){function s(i,u){if(!t[i]){if(!n[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(r)return r(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var l=t[i]={exports:{}};n[i][0].call(l.exports,function(e){var t=n[i][1][e];return s(t||e)},l,l.exports,e,n,t,o)}return t[i].exports}for(var r="function"==typeof require&&require,i=0;i<o.length;i++)s(o[i]);return s}({1:[function(e,n,t){"use strict";var o=e("lodash.isnull"),r=e("validate.io-undefined"),i=Object.prototype.toString;n.exports=function toStringTag(e){return o(e)?"[object Null]":r(e)?"[object Undefined]":i.call(e)}},{"lodash.isnull":2,"validate.io-undefined":3}],2:[function(e,n,t){n.exports=function isNull(e){return null===e}},{}],3:[function(e,n,t){"use strict";n.exports=function isUndefined(e){return void 0===e}},{}]},{},[1])(1)}); | ||
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/** | ||
* @file Get an object's ES6 @@toStringTag. | ||
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )} | ||
* @version 1.4.0 | ||
* @author Xotic750 <Xotic750@gmail.com> | ||
* @copyright Xotic750 | ||
* @license {@link <https://opensource.org/licenses/MIT> MIT} | ||
* @module to-string-tag-x | ||
*/ | ||
"use strict";var isNull=_dereq_("lodash.isnull"),isUndefined=_dereq_("validate.io-undefined"),toStr=Object.prototype.toString;module.exports=function toStringTag(value){return isNull(value)?"[object Null]":isUndefined(value)?"[object Undefined]":toStr.call(value)}},{"lodash.isnull":2,"validate.io-undefined":3}],2:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],3:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}]},{},[1])(1)}); |
{ | ||
"name": "to-string-tag-x", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Get an object's ES6 @@toStringTag.", | ||
@@ -35,3 +35,3 @@ "homepage": "https://github.com/Xotic750/to-string-tag-x", | ||
"devDependencies": { | ||
"@xotic750/eslint-config-standard-x": "^1.4.0", | ||
"@xotic750/eslint-config-standard-x": "^2.2.1", | ||
"browserify": "^14.4.0", | ||
@@ -43,3 +43,3 @@ "browserify-derequire": "^0.9.4", | ||
"es7-shim": "^6.0.0", | ||
"eslint": "^4.1.1", | ||
"eslint": "^4.2.0", | ||
"eslint-plugin-compat": "^1.0.4", | ||
@@ -55,10 +55,11 @@ "eslint-plugin-css-modules": "^2.7.2", | ||
"json3": "^3.3.2", | ||
"make-jasmine-spec-runner-html": "^1.2.0", | ||
"make-jasmine-spec-runner-html": "^1.3.0", | ||
"ncp": "^2.0.0", | ||
"nodemon": "^1.11.0", | ||
"nsp": "^2.6.3", | ||
"parallelshell": "^3.0.1", | ||
"replace-x": "^1.3.1", | ||
"replace-x": "^1.5.0", | ||
"rimraf": "^2.6.1", | ||
"serve": "^6.0.0", | ||
"uglify-js": "^3.0.23" | ||
"serve": "^6.0.2", | ||
"uglify-js": "^3.0.24" | ||
}, | ||
@@ -68,15 +69,20 @@ "scripts": { | ||
"clean:jasmine": "rimraf tests/index.html tests/run.js", | ||
"clean:all": "npm run clean:jasmine && npm run clean", | ||
"clean:all": "npm run clean:jasmine && npm run clean", | ||
"build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security", | ||
"build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html", | ||
"build:setver": "PKG_VER=$(node -p -e \"require('./package.json').version\") && replace-x \" @version .*\" \" @version ${PKG_VER}\" index.js", | ||
"production": "npm run clean:all && npm run build:jasmine && npm run build:setver && npm run build", | ||
"build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js", | ||
"build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js", | ||
"build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js", | ||
"build:replace": "npm run build:setver && npm run build:name && npm run build:description", | ||
"production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build", | ||
"start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"", | ||
"docs": "jsdoc2md --name-format --example-lang js index.js > README.md", | ||
"docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md", | ||
"docs:badges": "ncp badges.html README.md && npm run docs:name", | ||
"docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md", | ||
"lint": "eslint *.js tests/spec/*.js", | ||
"lint-fix": "eslint --fix *.js tests/spec/*.js", | ||
"lint-fix": "npm run lint -- --fix", | ||
"security": "nsp check", | ||
"test": "jasmine-node --matchall tests/spec/", | ||
"browserify": "browserify -p browserify-derequire -e index.js -o lib/to-string-tag-x.js -u 'crypto' -s returnExports", | ||
"uglify": "uglifyjs lib/to-string-tag-x.js -o lib/to-string-tag-x.min.js --support-ie8 --compress --keep-fnames --mangle --beautify ascii_only=true,beautify=false --source-map filename=lib/to-string-tag-x.map", | ||
"uglify": "uglifyjs lib/to-string-tag-x.js -o lib/to-string-tag-x.min.js --config-file .uglifyjsrc.json", | ||
"precommit": "npm run production", | ||
@@ -83,0 +89,0 @@ "prepush": "npm run production" |
@@ -1,30 +0,28 @@ | ||
<a name="module_to-string-tag-x"></a> | ||
## to-string-tag-x | ||
<a href="https://travis-ci.org/Xotic750/to-string-tag-x" | ||
title="Travis status"> | ||
<img src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master" | ||
alt="Travis status" height="18"> | ||
title="Travis status"> | ||
<img | ||
src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master" | ||
alt="Travis status" height="18"/> | ||
</a> | ||
<a href="https://david-dm.org/Xotic750/to-string-tag-x" | ||
title="Dependency status"> | ||
title="Dependency status"> | ||
<img src="https://david-dm.org/Xotic750/to-string-tag-x.svg" | ||
alt="Dependency status" height="18"/> | ||
alt="Dependency status" height="18"/> | ||
</a> | ||
<a href="https://david-dm.org/Xotic750/to-string-tag-x#info=devDependencies" | ||
title="devDependency status"> | ||
title="devDependency status"> | ||
<img src="https://david-dm.org/Xotic750/to-string-tag-x/dev-status.svg" | ||
alt="devDependency status" height="18"/> | ||
alt="devDependency status" height="18"/> | ||
</a> | ||
<a href="https://badge.fury.io/js/to-string-tag-x" title="npm version"> | ||
<img src="https://badge.fury.io/js/to-string-tag-x.svg" | ||
alt="npm version" height="18"> | ||
alt="npm version" height="18"/> | ||
</a> | ||
<a name="module_to-string-tag-x"></a> | ||
## to-string-tag-x | ||
Get an object's ES6 @@toStringTag. | ||
Requires ES3 or above. | ||
**See**: [19.1.3.6 Object.prototype.toString ( )](http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
**Version**: 1.3.0 | ||
**Version**: 1.4.0 | ||
**Author**: Xotic750 <Xotic750@gmail.com> | ||
@@ -31,0 +29,0 @@ **License**: [MIT](<https://opensource.org/licenses/MIT>) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
22705
1.14%18
20%0
-100%27
3.85%252
-8.03%51
-3.77%