Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@open-editor/shared

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-editor/shared - npm Package Compare versions

Comparing version
0.8.2
to
0.8.3
+2
-2
dist/index.d.ts
declare const ServerApis: {
readonly OPEN_EDITOR: "/__open-editor__";
readonly OPEN_EDITOR: "/__open_editor__";
};

@@ -21,4 +21,4 @@

declare function injectClient(code: string, opts: AnyObject): string;
declare function injectClient(code: string, userOpts: AnyObject): string;
export { ServerApis, camelCase, clamp, hasOwnProperty, injectClient, isArr, isBol, isFn, isNaN, isNum, isObj, isStr, omit };

@@ -1,1 +0,6 @@

"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}const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,opts){return(useStrictRE.test(code)?'"use strict";':"")+'import { setupClient } from "@open-editor/client";'+code.replace(useStrictRE,"")+';if(typeof window !== "undefined"){ setupClient('+JSON.stringify(opts)+")};"}exports.ServerApis=ServerApis,exports.camelCase=camelCase,exports.clamp=clamp,exports.hasOwnProperty=hasOwnProperty,exports.injectClient=injectClient,exports.isArr=isArr,exports.isBol=isBol,exports.isFn=isFn,exports.isNaN=isNaN,exports.isNum=isNum,exports.isObj=isObj,exports.isStr=isStr,exports.omit=omit;
"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$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=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$1.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols$1)for(var prop of __getOwnPropSymbols$1(b))__propIsEnum$1.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}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
`:"")+(isCommonjs?`const { setupClient } = require("@open-editor/client");
`:`import { setupClient } from "@open-editor/client";
`)+code.replace(useStrictRE,"")+`
if(typeof window !== "undefined"){setupClient(`+JSON.stringify(opts)+`)};
`}exports.ServerApis=ServerApis,exports.camelCase=camelCase,exports.clamp=clamp,exports.hasOwnProperty=hasOwnProperty,exports.injectClient=injectClient,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 +0,6 @@

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}const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,opts){return(useStrictRE.test(code)?'"use strict";':"")+'import { setupClient } from "@open-editor/client";'+code.replace(useStrictRE,"")+';if(typeof window !== "undefined"){ setupClient('+JSON.stringify(opts)+")};"}export{ServerApis,camelCase,clamp,hasOwnProperty,injectClient,isArr,isBol,isFn,isNaN,isNum,isObj,isStr,omit};
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$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=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$1.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols$1)for(var prop of __getOwnPropSymbols$1(b))__propIsEnum$1.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}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
`:"")+(isCommonjs?`const { setupClient } = require("@open-editor/client");
`:`import { setupClient } from "@open-editor/client";
`)+code.replace(useStrictRE,"")+`
if(typeof window !== "undefined"){setupClient(`+JSON.stringify(opts)+`)};
`}export{ServerApis,camelCase,clamp,hasOwnProperty,injectClient,isArr,isBol,isFn,isNaN,isNum,isObj,isStr,omit};
{
"name": "@open-editor/shared",
"version": "0.8.2",
"version": "0.8.3",
"description": "internal utils shared across @open-editor packages",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",