@open-editor/shared
Advanced tools
+9
-1
@@ -13,2 +13,10 @@ declare const ServerApis: { | ||
| export { ServerApis, isArr, isBol, isFn, isNaN, isNum, isObj, isStr }; | ||
| declare function camelCase(str: string): string; | ||
| declare function clamp(val: number, start: number, end: number): number; | ||
| declare function hasOwnProperty<Obj extends object, Prop extends PropertyKey>(obj: Partial<Obj>, prop: Prop): obj is Obj & Record<Prop, Prop extends keyof Obj ? Obj[Prop] : any>; | ||
| declare function omit<T extends AnyObject, K extends keyof T>(val: T, ...keys: K[]): Omit<T, K>; | ||
| export { ServerApis, camelCase, clamp, hasOwnProperty, isArr, isBol, isFn, isNaN, isNum, isObj, isStr, omit }; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| "use strict";const ServerApis={OPEN_EDITOR:"/__open-editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}exports.ServerApis=ServerApis,exports.isArr=isArr,exports.isBol=isBol,exports.isFn=isFn,exports.isNaN=isNaN,exports.isNum=isNum,exports.isObj=isObj,exports.isStr=isStr; | ||
| "use strict";const ServerApis={OPEN_EDITOR:"/__open-editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a};function omit(val,...keys){const newVal=__spreadValues({},val);for(const key of keys)hasOwnProperty(val,key)&&delete newVal[key];return newVal}exports.ServerApis=ServerApis,exports.camelCase=camelCase,exports.clamp=clamp,exports.hasOwnProperty=hasOwnProperty,exports.isArr=isArr,exports.isBol=isBol,exports.isFn=isFn,exports.isNaN=isNaN,exports.isNum=isNum,exports.isObj=isObj,exports.isStr=isStr,exports.omit=omit; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| const ServerApis={OPEN_EDITOR:"/__open-editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}export{ServerApis,isArr,isBol,isFn,isNaN,isNum,isObj,isStr}; | ||
| const ServerApis={OPEN_EDITOR:"/__open-editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a};function omit(val,...keys){const newVal=__spreadValues({},val);for(const key of keys)hasOwnProperty(val,key)&&delete newVal[key];return newVal}export{ServerApis,camelCase,clamp,hasOwnProperty,isArr,isBol,isFn,isNaN,isNum,isObj,isStr,omit}; |
+1
-1
| { | ||
| "name": "@open-editor/shared", | ||
| "version": "0.7.3", | ||
| "version": "0.7.4", | ||
| "description": "internal utils shared across @open-editor packages", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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 2 instances in 1 package
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 2 instances in 1 package
8884
40.26%72
20%