@fower/utils
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,6 +0,5 @@ | ||
import isBrowser from 'is-in-browser'; | ||
import hash from 'string-hash'; | ||
declare type Dict = Record<string, any>; | ||
export { isBrowser, hash }; | ||
export declare const isDev: boolean; | ||
export { hash }; | ||
export declare const isBrowser: boolean; | ||
export declare function upFirst(s?: string): string; | ||
@@ -7,0 +6,0 @@ export declare function downFirst(s?: string): string; |
@@ -7,6 +7,5 @@ 'use strict'; | ||
var isInBrowser = _interopDefault(require('is-in-browser')); | ||
var hash = _interopDefault(require('string-hash')); | ||
var isDev = "development" !== 'production'; | ||
var isBrowser = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9; | ||
function upFirst(s) { | ||
@@ -76,6 +75,5 @@ if (s === void 0) { | ||
exports.isBrowser = isInBrowser; | ||
exports.hash = hash; | ||
exports.downFirst = downFirst; | ||
exports.isDev = isDev; | ||
exports.isBrowser = isBrowser; | ||
exports.isEmptyObj = isEmptyObj; | ||
@@ -82,0 +80,0 @@ exports.isNumber = isNumber; |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("is-in-browser")),r=e(require("string-hash"));function n(e){return void 0===e&&(e=""),e.replace(/^[A-Z]/,(function(e){return e.toLowerCase()}))}function s(e){return n(e).replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))}exports.isBrowser=t,exports.hash=r,exports.downFirst=n,exports.isDev=!1,exports.isEmptyObj=function(e){return!e||!Object.keys(e).length},exports.isNumber=function(e){return/^-?[0-9.]+$/.test(e)},exports.isPercentNumber=function(e){return/^-?\d+p$/.test(e)},exports.jsKeyToCssKey=function(e){return/^[A-Z].+$/.test(e)?"-"+s(e):s(e)},exports.kebab=s,exports.objectToClassName=function(e,t){return void 0===t&&(t="css-"),t+r(JSON.stringify(e))},exports.upFirst=function(e){return void 0===e&&(e=""),e.replace(/^[a-z]/,(function(e){return e.toUpperCase()}))}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("string-hash"))&&"object"==typeof e&&"default"in e?e.default:e,r="object"==typeof window&&"object"==typeof document&&9===document.nodeType;function o(e){return void 0===e&&(e=""),e.replace(/^[A-Z]/,(function(e){return e.toLowerCase()}))}function n(e){return o(e).replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))}exports.hash=t,exports.downFirst=o,exports.isBrowser=r,exports.isEmptyObj=function(e){return!e||!Object.keys(e).length},exports.isNumber=function(e){return/^-?[0-9.]+$/.test(e)},exports.isPercentNumber=function(e){return/^-?\d+p$/.test(e)},exports.jsKeyToCssKey=function(e){return/^[A-Z].+$/.test(e)?"-"+n(e):n(e)},exports.kebab=n,exports.objectToClassName=function(e,r){return void 0===r&&(r="css-"),r+t(JSON.stringify(e))},exports.upFirst=function(e){return void 0===e&&(e=""),e.replace(/^[a-z]/,(function(e){return e.toUpperCase()}))}; | ||
//# sourceMappingURL=utils.cjs.production.min.js.map |
@@ -1,6 +0,5 @@ | ||
export { default as isBrowser } from 'is-in-browser'; | ||
import hash from 'string-hash'; | ||
export { default as hash } from 'string-hash'; | ||
var isDev = process.env.NODE_ENV !== 'production'; | ||
var isBrowser = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9; | ||
function upFirst(s) { | ||
@@ -70,3 +69,3 @@ if (s === void 0) { | ||
export { downFirst, isDev, isEmptyObj, isNumber, isPercentNumber, jsKeyToCssKey, kebab, objectToClassName, upFirst }; | ||
export { downFirst, isBrowser, isEmptyObj, isNumber, isPercentNumber, jsKeyToCssKey, kebab, objectToClassName, upFirst }; | ||
//# sourceMappingURL=utils.esm.js.map |
{ | ||
"name": "@fower/utils", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "a86822a8163a224c9ddc9ef991e348c085814a12" | ||
"gitHead": "63714c0af94f7612dca4656128fa5d09f5547453" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15031
2
175