@jdfed/hooks
Advanced tools
Comparing version 0.5.0 to 0.6.0-alpha.0
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/slicedToArray";import{useState as t,useCallback as r,useRef as a,useEffect as n,useMemo as c}from"react";import i from"@babel/runtime/helpers/esm/toConsumableArray";import o from"ahooks/es/useDebounceFn";import u from"@babel/runtime/helpers/esm/defineProperty";import l from"@babel/runtime/helpers/esm/typeof";import s,{produce as d}from"immer";import f from"moment";import{isEmpty as p,typeCheck as m,generateReg as y}from"@jdfed/utils";import h from"@babel/runtime/helpers/esm/asyncToGenerator";import v from"@babel/runtime/regenerator";var b=function(a){var n=t(a),c=e(n,2),i=c[0],o=c[1];return[i,r((function(){o(!0)}),[]),r((function(){o(!1)}),[])]},S=function(e){var t=a(null);return n((function(){t.current=e})),t},g=function(e){var t=a();return n((function(){t.current=e})),t.current},D=function(e,t){var c=a((function(){throw new Error("Cannot call an event handler while rendering.")}));return n((function(){c.current=e}),[e].concat(i(t))),r((function(){var e=c.current;return e.apply(void 0,arguments)}),[c])},K=function(){var e=a(!0),t=r((function(){e.current=!1}),[]),n=r((function(){e.current=!0}),[]);return[e.current,t,n]},j=function(e){return o((function(t){var r=t.dataSchema,a=t.formData,n=t.dispatch,c=t.visibleFieldKey,i=t.ajv,o=t.onValidate,u=Object.keys(o).filter((function(e){return"change"===o[e].type})),l=e({schema:r,formData:a,ajv:i,visibleFieldKey:c}),s=l.errorsMap,d=l.formData;n({type:"setError",errors:s,ignore:u}),n({type:"setFormData",formData:d}),n({type:"setChecking",checking:!1}),n({type:"setDefaultSuccess",hasDefault:!0})}),{wait:500}).run};function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}var O={isMoment:function(e){var t=e.value,r=e.format;return t?Array.isArray(t)?[t[0].format(r),t[1].format(r)]:f(t).format(r):t},isColor:function(e){var t,r,a,n,c=e.value;if("object"===l(c))switch(c.source){case"rgb":return"rgba(".concat((null==c||null===(t=c.rgb)||void 0===t?void 0:t.r)||0,",").concat((null==c||null===(r=c.rgb)||void 0===r?void 0:r.g)||0,",").concat((null==c||null===(a=c.rgb)||void 0===a?void 0:a.b)||0,",").concat((null==c||null===(n=c.rgb)||void 0===n?void 0:n.a)||1,")");default:return(null==c?void 0:c.hex)||"#ffffff"}return c},isWithPid:function(e){var t=e.value,r=e.options,a=e.withPidDelimiter,n=function e(t){return t.reduce((function(t,r){if(r.children){var a=e(r.children);return t.concat(a).concat(r)}return t.concat(r)}),[])}(r);return t.map((function(e){return function e(t,r){var c=n.findIndex((function(e){return e.value===t}));if(-1!=c){var i=n[c].parentValue;return e(i,r="".concat(i).concat(a).concat(r||t))}return r}(e)}))},isFormat:function(e){var t=e.value,r=e.disabled_input;if(r){var a=r.join("|"),n=new RegExp(a,"g");if(n.test(t))return t.replace(n,"")}return t},isSelectText:function(e){var t=e.value,r=e.subFieldKey,a=e.prevFieldData;return Object.assign({select:[],text:""},"Object"===m(a)?a:{},u({},r,t))}},k=function(e,t){var r=e.fieldKey,a=e.onChange,n=e.options,c=void 0===n?{}:n,i=e.asyncValidate,l=e.prevFieldData,s=e.fieldData,f=e.getKey,m=o((function(e,t){if(a)try{if("function"==typeof a)a({val:e,dispatch:t,fieldKey:r,prevFieldData:l,fieldData:s,getKey:f});else{var n=new Function("props",a);n&&n({val:e,dispatch:t,fieldKey:r,prevFieldData:l,fieldData:s,getKey:f})}}catch(e){console.error("onChange函数体错误"),console.error(e)}if(i&&"change"===i.type){var c=i.fn(e);null!=c&&c.then?c.then((function(e){t(e?u({type:"setError"},r,e):{type:"deleteError",key:r})})):t(c?u({type:"setError"},r,c):{type:"deleteError",key:r})}}),{wait:300}).run;return D((function(e){var a,n=p(s)?null!=e&&e.target?null==e||null===(a=e.target)||void 0===a?void 0:a.value:e:s;c.draft&&(n=d(n,(function(e){return e})));var i,o=Object.keys(O),l=Object.keys(c).filter((function(e){return!0===c[e]&&o.includes(e)}));(1===l.length&&O[l[0]]&&(n=O[l[0]](function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({value:n},c))),Object.prototype.hasOwnProperty.call(c,"isDelete")?c.isDelete:p(n))?(t({type:"deleteFormData",key:r}),t((u(i={type:"setDataSchema"},"".concat(f(r,"dataSchema"),".default"),""),u(i,"isDelete",!0),i))):t(u({type:"setFormData"},r,n));t({type:"setChecking",checking:!0}),m(n,t)}),[t,a,r])},w=function(e,t){var a=e.options,n=e.queryFunc,c=e.requestCache,i=void 0===c||c,o=e.fieldKey,l=e.getKey;return r(h(v.mark((function e(){var r,c=arguments;return v.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==a.length&&i||!n){e.next=5;break}return e.next=3,n.apply(void 0,c);case 3:r=e.sent,t(u({type:"setUiSchema"},"".concat(l(o,"uiSchema"),".options"),r));case 5:case"end":return e.stop()}}),e)}))),[t,o,l,a.length,n,i])},P=function(e){var t=e.fieldKey,a=e.dispatch,n=e.fieldData;return{addItem:r((function(e,r){a({type:"setArrayKey",action:{fieldKey:t,order:e}}),a(u({type:"setFormData"},t,s(n||[],(function(t){t.splice(e,0,r)}))))}),[a,n,t]),deltItem:r((function(e){a({type:"setArrayKey",action:{fieldKey:t,order:e,isDelete:!0}}),a({type:"deleteFormData",key:"".concat(t,".").concat(e)})}),[a,t])}},E=function(e){var t=e.fieldKey,r=e.dispatch;n((function(){return r({type:"setVisibleFieldKey",key:t}),function(){r({type:"deleteVisibleFieldKey",key:t})}}),[r,t])},x=function(e){var t=r((function(t){var r=Object.keys(e).find((function(e){return y(t.split(".")).test(e)}));if(!r)throw"无法在typeMap中找到与".concat(t,"对应的key");return r}),[e]),a=r((function(r,a){return"data"===a?r:t(r).split(".").reduce((function(t,r,n,c){switch(0===n?"object":e[c.slice(0,n).join(".")].type){case"array":return"$container"===r?"uiSchema"===a?"".concat(t?"".concat(t,"."):"","properties.").concat(r):"".concat(t?"".concat(t,"."):"","items"):"uiSchema"===a?"".concat(t?"".concat(t,"."):"","properties.").concat(r):"".concat(t?"".concat(t,"."):"","items.").concat(r);case"object":default:return"".concat(t?"".concat(t,"."):"","properties.").concat(r)}}),"")}),[t,e]);return{getTypeKey:t,getKey:a}},C=function(e){var t=e.uiSchema,a=e.dataSchema,n=e.typeMap,c=e.formData,i=e.dispatch,o=x(n),l=o.getTypeKey,d=o.getKey,f=r((function(e){if(e){var r=e.split(".");return l(e).split(".").reduce((function(e,t,a,c){return""===t?e:0===a||"object"===n[c.slice(0,a).join(".")].type?{uiSchema:e.uiSchema.properties[t],dataSchema:e.dataSchema.properties[t],data:e.data?e.data[t]:void 0}:"array"===n[c.slice(0,a).join(".")].type?"$container"===t?{uiSchema:e.uiSchema.properties.$container,dataSchema:e.dataSchema[0===a?"properties":"items"],data:e.data?e.data[r[a]]:void 0}:{uiSchema:e.uiSchema.properties[t],dataSchema:e.dataSchema[0===a?"properties":"items"][t],data:e.data?e.data[t]:void 0}:{uiSchema:e.uiSchema,dataSchema:e.dataSchema,data:e.data}}),{data:c,uiSchema:t,dataSchema:a})}return{uiSchema:t,dataSchema:a,data:c}}),[a,c,l,n,t]),p=r((function(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",u={data:c,uiSchema:t,dataSchema:a};if(""===e)i=u[n];else{var l=d(e,n);i=l.split(".").reduce((function(e,t){return e[t]}),u[n])}switch(m(r)){case"Function":return s(i,r);case"Object":if("set"===o)return r;var f=function e(t,r){return s(t,(function(t){for(var a in r)"Object"===m(r[a])&&t[a]?t[a]=e(t[a],r[a]):t[a]=r[a]}))};return f(i,r);default:return r}}),[a,c,d,t]),y=r((function(e,t,r){switch(t){case"data":i(u({type:"setFormData"},""===e?"formData":e,p(e,r,"data")));break;case"uiSchema":i(u({type:"setUiSchema"},""===e?"uiSchema":d(e,"uiSchema"),p(e,r,"uiSchema")));break;case"dataSchema":i(u({type:"setDataSchema"},""===e?"dataSchema":d(e,"dataSchema"),p(e,r,"dataSchema")))}}),[i,d,p]),h=r((function(e,t,r){switch(t){case"data":i(u({type:"setFormData"},""===e?"formData":e,p(e,r,"data","merge")));break;case"uiSchema":i(u({type:"setUiSchema"},""===e?"uiSchema":d(e,"uiSchema"),p(e,r,"uiSchema","merge")));break;case"dataSchema":i(u({type:"setDataSchema"},""===e?"dataSchema":d(e,"dataSchema"),p(e,r,"dataSchema","merge")))}}),[i,d,p]),v=r((function(e){i({type:"deleteField",fieldKey:e,get:f,getKey:d,getTypeKey:l})}),[i,f,d,l]),b=r((function(e){var t=e.fieldKey,r=e.closestEdge,a=e.unitedSchema,n=e.overFieldKey,c=e.cb,o=e.shouldDelete;i({type:"addField",fieldKey:t,closestEdge:r,unitedSchema:a,overFieldKey:n,get:f,getKey:d,getTypeKey:l,shouldDelete:o}),c&&c()}),[i,f,d,l]);return{get:f,set:y,deleteField:v,addField:b,merge:h}},T=function(e,t){return c((function(){return"edit"===e?t:{}}),[t,e])};export{P as useArray,K as useClickOne,E as useContainer,T as useContainerStyle,D as useEventCallback,k as useField,x as useGetKey,b as useModal,g as usePrevious,w as useQuery,S as useRefProp,C as useSchema,j as useValidate}; | ||
import e from"@babel/runtime/helpers/esm/slicedToArray";import{useState as t,useCallback as r,useRef as a,useEffect as n,useMemo as c}from"react";import i from"@babel/runtime/helpers/esm/toConsumableArray";import o from"ahooks/es/useDebounceFn";import u from"@babel/runtime/helpers/esm/defineProperty";import l from"@babel/runtime/helpers/esm/typeof";import s,{produce as d}from"immer";import f from"moment";import{isEmpty as p,typeCheck as m,generateReg as y}from"@jdfed/utils";import h from"@babel/runtime/helpers/esm/asyncToGenerator";import v from"@babel/runtime/regenerator";var b=function(a){var n=t(a),c=e(n,2),i=c[0],o=c[1];return[i,r((function(){o(!0)}),[]),r((function(){o(!1)}),[])]},S=function(e){var t=a(null);return n((function(){t.current=e})),t},g=function(e){var t=a();return n((function(){t.current=e})),t.current},D=function(e,t){var c=a((function(){throw new Error("Cannot call an event handler while rendering.")}));return n((function(){c.current=e}),[e].concat(i(t))),r((function(){var e=c.current;return e.apply(void 0,arguments)}),[c])},K=function(){var e=a(!0),t=r((function(){e.current=!1}),[]),n=r((function(){e.current=!0}),[]);return[e.current,t,n]},j=function(e){return o((function(t){var r=t.dataSchema,a=t.formData,n=t.dispatch,c=t.visibleFieldKey,i=t.ajv,o=t.onValidate,u=Object.keys(o).filter((function(e){return"change"===o[e].type})),l=e({schema:r,formData:a,ajv:i,visibleFieldKey:c}),s=l.errorsMap,d=l.formData;n({type:"setError",errors:s,ignore:u}),n({type:"setFormData",formData:d}),n({type:"setChecking",checking:!1}),n({type:"setDefaultSuccess",hasDefault:!0})}),{wait:500}).run};function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}var O={isMoment:function(e){var t=e.value,r=e.format;return t?Array.isArray(t)?[t[0].format(r),t[1].format(r)]:f(t).format(r):t},isColor:function(e){var t,r,a,n,c=e.value;if("object"===l(c))switch(c.source){case"rgb":return"rgba(".concat((null==c||null===(t=c.rgb)||void 0===t?void 0:t.r)||0,",").concat((null==c||null===(r=c.rgb)||void 0===r?void 0:r.g)||0,",").concat((null==c||null===(a=c.rgb)||void 0===a?void 0:a.b)||0,",").concat((null==c||null===(n=c.rgb)||void 0===n?void 0:n.a)||1,")");default:return(null==c?void 0:c.hex)||"#ffffff"}return c},isWithPid:function(e){var t=e.value,r=e.options,a=e.withPidDelimiter,n=function e(t){return t.reduce((function(t,r){if(r.children){var a=e(r.children);return t.concat(a).concat(r)}return t.concat(r)}),[])}(r);return t.map((function(e){return function e(t,r){var c=n.findIndex((function(e){return e.value===t}));if(-1!=c){var i=n[c].parentValue;return e(i,r="".concat(i).concat(a).concat(r||t))}return r}(e)}))},isFormat:function(e){var t=e.value,r=e.disabled_input;if(r){var a=r.join("|"),n=new RegExp(a,"g");if(n.test(t))return t.replace(n,"")}return t},isSelectText:function(e){var t=e.value,r=e.subFieldKey,a=e.prevFieldData;return Object.assign({select:[],text:""},"Object"===m(a)?a:{},u({},r,t))}},k=function(e,t){var r=e.fieldKey,a=e.onChange,n=e.options,c=void 0===n?{}:n,i=e.asyncValidate,l=e.prevFieldData,s=e.fieldData,f=e.getKey,m=o((function(e,t){if(a)try{if("function"==typeof a)a({val:e,dispatch:t,fieldKey:r,prevFieldData:l,fieldData:s,getKey:f});else{var n=new Function("props",a);n&&n({val:e,dispatch:t,fieldKey:r,prevFieldData:l,fieldData:s,getKey:f})}}catch(e){console.error("onChange函数体错误"),console.error(e)}if(i&&"change"===i.type){var c=i.fn(e);null!=c&&c.then?c.then((function(e){t(e?u({type:"setError"},r,e):{type:"deleteError",key:r})})):t(c?u({type:"setError"},r,c):{type:"deleteError",key:r})}}),{wait:300}).run;return D((function(e){var a,n=p(s)?null!=e&&e.target?null==e||null===(a=e.target)||void 0===a?void 0:a.value:e:s;c.draft&&(n=d(n,(function(e){return e})));var i,o=Object.keys(O),l=Object.keys(c).filter((function(e){return!0===c[e]&&o.includes(e)}));(1===l.length&&O[l[0]]&&(n=O[l[0]](function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({value:n},c))),Object.prototype.hasOwnProperty.call(c,"isDelete")?c.isDelete:p(n))?(t({type:"deleteFormData",key:r}),t((u(i={type:"setDataSchema"},"".concat(f(r,"dataSchema"),".default"),""),u(i,"isDelete",!0),i))):t(u({type:"setFormData"},r,n));t({type:"setChecking",checking:!0}),m(n,t)}),[t,a,r])},w=function(e,t){var a=e.options,n=e.queryFunc,c=e.requestCache,i=void 0===c||c,o=e.fieldKey,l=e.getKey;return r(h(v.mark((function e(){var r,c=arguments;return v.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==a.length&&i||!n){e.next=5;break}return e.next=3,n.apply(void 0,c);case 3:r=e.sent,t(u({type:"setUiSchema"},"".concat(l(o,"uiSchema"),".options"),r));case 5:case"end":return e.stop()}}),e)}))),[t,o,l,a.length,n,i])},E=function(e){var t=e.fieldKey,a=e.dispatch,n=e.fieldData;return{addItem:r((function(e,r){a({type:"setArrayKey",action:{fieldKey:t,order:e}}),a(u({type:"setFormData"},t,s(n||[],(function(t){t.splice(e,0,r)}))))}),[a,n,t]),deltItem:r((function(e){a({type:"setArrayKey",action:{fieldKey:t,order:e,isDelete:!0}}),a({type:"deleteError",key:"".concat(t,".").concat(e)}),a({type:"deleteFormData",key:"".concat(t,".").concat(e)})}),[a,t])}},P=function(e){var t=e.fieldKey,r=e.dispatch;n((function(){return r({type:"setVisibleFieldKey",key:t}),function(){r({type:"deleteVisibleFieldKey",key:t})}}),[r,t])},x=function(e){var t=r((function(t){var r=Object.keys(e).find((function(e){return y(t.split(".")).test(e)}));if(!r)throw"无法在typeMap中找到与".concat(t,"对应的key");return r}),[e]),a=r((function(r,a){return"data"===a?r:t(r).split(".").reduce((function(t,r,n,c){switch(0===n?"object":e[c.slice(0,n).join(".")].type){case"array":return"$container"===r?"uiSchema"===a?"".concat(t?"".concat(t,"."):"","properties.").concat(r):"".concat(t?"".concat(t,"."):"","items"):"uiSchema"===a?"".concat(t?"".concat(t,"."):"","properties.").concat(r):"".concat(t?"".concat(t,"."):"","items.").concat(r);case"object":default:return"".concat(t?"".concat(t,"."):"","properties.").concat(r)}}),"")}),[t,e]);return{getTypeKey:t,getKey:a}},C=function(e){var t=e.uiSchema,a=e.dataSchema,n=e.typeMap,c=e.formData,i=e.dispatch,o=x(n),l=o.getTypeKey,d=o.getKey,f=r((function(e){if(e){var r=e.split(".");return l(e).split(".").reduce((function(e,t,a,c){return""===t?e:0===a||"object"===n[c.slice(0,a).join(".")].type?{uiSchema:e.uiSchema.properties[t],dataSchema:e.dataSchema.properties[t],data:e.data?e.data[t]:void 0}:"array"===n[c.slice(0,a).join(".")].type?"$container"===t?{uiSchema:e.uiSchema.properties.$container,dataSchema:e.dataSchema[0===a?"properties":"items"],data:e.data?e.data[r[a]]:void 0}:{uiSchema:e.uiSchema.properties[t],dataSchema:e.dataSchema[0===a?"properties":"items"][t],data:e.data?e.data[t]:void 0}:{uiSchema:e.uiSchema,dataSchema:e.dataSchema,data:e.data}}),{data:c,uiSchema:t,dataSchema:a})}return{uiSchema:t,dataSchema:a,data:c}}),[a,c,l,n,t]),p=r((function(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",u={data:c,uiSchema:t,dataSchema:a};if(""===e)i=u[n];else{var l=d(e,n);i=l.split(".").reduce((function(e,t){return e[t]}),u[n])}switch(m(r)){case"Function":return s(i,r);case"Object":if("set"===o)return r;var f=function e(t,r){return s(t,(function(t){for(var a in r)"Object"===m(r[a])&&t[a]?t[a]=e(t[a],r[a]):t[a]=r[a]}))};return f(i,r);default:return r}}),[a,c,d,t]),y=r((function(e,t,r){switch(t){case"data":i(u({type:"setFormData"},""===e?"formData":e,p(e,r,"data")));break;case"uiSchema":i(u({type:"setUiSchema"},""===e?"uiSchema":d(e,"uiSchema"),p(e,r,"uiSchema")));break;case"dataSchema":i(u({type:"setDataSchema"},""===e?"dataSchema":d(e,"dataSchema"),p(e,r,"dataSchema")))}}),[i,d,p]),h=r((function(e,t,r){switch(t){case"data":i(u({type:"setFormData"},""===e?"formData":e,p(e,r,"data","merge")));break;case"uiSchema":i(u({type:"setUiSchema"},""===e?"uiSchema":d(e,"uiSchema"),p(e,r,"uiSchema","merge")));break;case"dataSchema":i(u({type:"setDataSchema"},""===e?"dataSchema":d(e,"dataSchema"),p(e,r,"dataSchema","merge")))}}),[i,d,p]),v=r((function(e){i({type:"deleteField",fieldKey:e,get:f,getKey:d,getTypeKey:l})}),[i,f,d,l]),b=r((function(e){var t=e.fieldKey,r=e.closestEdge,a=e.unitedSchema,n=e.overFieldKey,c=e.cb,o=e.shouldDelete;i({type:"addField",fieldKey:t,closestEdge:r,unitedSchema:a,overFieldKey:n,get:f,getKey:d,getTypeKey:l,shouldDelete:o}),c&&c()}),[i,f,d,l]);return{get:f,set:y,deleteField:v,addField:b,merge:h}},T=function(e,t){return c((function(){return"edit"===e?t:{}}),[t,e])};export{E as useArray,K as useClickOne,P as useContainer,T as useContainerStyle,D as useEventCallback,k as useField,x as useGetKey,b as useModal,g as usePrevious,w as useQuery,S as useRefProp,C as useSchema,j as useValidate}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jdfed/hooks", | ||
"version": "0.5.0", | ||
"version": "0.6.0-alpha.0", | ||
"description": "drip-form通用hooks", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"@babel/runtime": "^7.10.2", | ||
"@jdfed/utils": "^0.5.0", | ||
"@jdfed/utils": "^0.6.0-alpha.0", | ||
"ahooks": "^2.10.12", | ||
@@ -45,3 +45,3 @@ "ajv": "^8.8.2", | ||
}, | ||
"gitHead": "2f6c848334d5a64de63eedb8f7d47d7ec6043f62" | ||
"gitHead": "4b247bb864ba6ddfe08b1426ee009111917ca9a7" | ||
} |
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
211481
+ Added@jdfed/utils@0.6.0(transitive)
- Removed@jdfed/utils@0.5.0(transitive)
Updated@jdfed/utils@^0.6.0-alpha.0