New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cox-postposition

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cox-postposition - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

dist/cox.postposition.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.postposition=t():(e.cox=e.cox||{},e.cox.postposition=t())}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"check",function(){return l}),n.d(t,"pick",function(){return d}),n.d(t,"put",function(){return x}),n.d(t,"fix",function(){return g});var o=/[^a-zA-Z0-9ㄱ-ㅎ가-힣\s]+/g,r=/^[\s\S]*?(\S*)\s*$/,i=new RegExp("(?:"+["check|[hm]ook|limit"].join("|")+")$","i"),u=new RegExp("(?:"+["[ㄱ-ㄷㅁ-ㅎ036]","^[mn]","\\S[mn]e?","\\S(?:[aeiom]|lu)b","(?:u|\\S[aei]|[^o]o)p","(?:^i|[^auh]i|\\Su|[^ei][ae]|[^oi]o)t","(?:\\S[iou]|[^e][ae])c?k","\\S[aeiou](?:c|ng)","foot|go+d|b[ai]g|private","^(?:app|kor)"].join("|")+")$","i"),c=new RegExp("(?:"+["[178ㄹ]","^[lr]","^\\Sr","\\Sle?"].join("|")+")$","i"),f={"은":"는","이":"가","과":"와","이나":"나","을":"를","으로":"로"},p=function(){var e={};for(var t in f)e[f[t]]=t;return e}(),a=function(e,t){return!i.test(e)&&(u.test(e)||!t&&c.test(e))},s=function(e,t){var n=(e-44032)%28;return 0!==n&&!(t&&8===n)},l=function(e,t){var n=e.replace(o," ").replace(r,"$1"),i=n.charAt(n.length-1).charCodeAt(),u=44032<=i&&i<=55203,c="로"===t||"으로"===t;return u?s(i,c):a(n,c)},d=function(e,t,n){return"string"!=typeof n&&(t=f[t]||t||"",n=p[t]||t),l(e,t)?n:t},x=function(e,t,n){return""+e+d(e,t,n)},g=function(e,t){return function(n){return x(n,e,t)}};t.default={check:l,pick:d,put:x,fix:g}}])});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.postposition=n():(t.cox=t.cox||{},t.cox.postposition=n())}(this,function(){return function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="/dist",n(n.s=37)}([function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){t.exports=!r(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(4),o=r(10);t.exports=r(2)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(8),o=r(29),i=r(23),u=Object.defineProperty;n.f=r(2)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(48),o=r(13);t.exports=function(t){return e(o(t))}},function(t,n,r){var e=r(21)("wks"),o=r(11),i=r(0).Symbol,u="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=e},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(7);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n){var r=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=r)},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){t.exports={}},function(t,n){t.exports=!0},function(t,n,r){var e=r(34),o=r(14);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(4).f,o=r(1),i=r(6)("toStringTag");t.exports=function(t,n,r){t&&!o(t=r?t:t.prototype,i)&&e(t,i,{configurable:!0,value:n})}},function(t,n,r){var e=r(21)("keys"),o=r(11);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n,r){var e=r(0),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(7);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(0),o=r(12),i=r(16),u=r(25),c=r(4).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){n.f=r(6)},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(7),o=r(0).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(0),o=r(12),i=r(45),u=r(3),c=function(t,n,r){var f,a,s,p=t&c.F,l=t&c.G,y=t&c.S,v=t&c.P,h=t&c.B,d=t&c.W,b=l?o:o[n]||(o[n]={}),g=b.prototype,m=l?e:y?e[n]:(e[n]||{}).prototype;l&&(r=n);for(f in r)(a=!p&&m&&void 0!==m[f])&&f in b||(s=a?m[f]:r[f],b[f]=l&&"function"!=typeof m[f]?r[f]:h&&a?i(s,e):d&&m[f]==s?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):v&&"function"==typeof s?i(Function.call,s):s,v&&((b.virtual||(b.virtual={}))[f]=s,t&c.R&&g&&!g[f]&&u(g,f,s)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,r){t.exports=!r(2)&&!r(9)(function(){return 7!=Object.defineProperty(r(27)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){"use strict";var e=r(16),o=r(28),i=r(35),u=r(3),c=r(1),f=r(15),a=r(50),s=r(19),p=r(56),l=r(6)("iterator"),y=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,r,h,d,b,g){a(r,n,h);var m,x,S,O=function(t){if(!y&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},w=n+" Iterator",_="values"==d,j=!1,P=t.prototype,E=P[l]||P["@@iterator"]||d&&P[d],L=!y&&E||O(d),M=d?_?O("entries"):L:void 0,k="Array"==n?P.entries||E:E;if(k&&(S=p(k.call(new t)))!==Object.prototype&&S.next&&(s(S,w,!0),e||c(S,l)||u(S,l,v)),_&&E&&"values"!==E.name&&(j=!0,L=function(){return E.call(this)}),e&&!g||!y&&!j&&P[l]||u(P,l,L),f[n]=L,f[w]=v,d)if(m={values:_?L:O("values"),keys:b?L:O("keys"),entries:M},g)for(x in m)x in P||i(P,x,m[x]);else o(o.P+o.F*(y||j),n,m);return m}},function(t,n,r){var e=r(8),o=r(53),i=r(14),u=r(20)("IE_PROTO"),c=function(){},f=function(){var t,n=r(27)("iframe"),e=i.length;for(n.style.display="none",r(47).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;e--;)delete f.prototype[i[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(c.prototype=e(t),r=new c,c.prototype=null,r[u]=t):r=f(),void 0===n?r:o(r,n)}},function(t,n,r){var e=r(34),o=r(14).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(1),o=r(5),i=r(44)(!1),u=r(20)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),f=0,a=[];for(r in c)r!=u&&e(c,r)&&a.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~i(a,r)||a.push(r));return a}},function(t,n,r){t.exports=r(3)},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=r(39),i=e(o),u=r(38),c=e(u),f="function"==typeof c.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===f(i.default)?function(t){return void 0===t?"undefined":f(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":f(t)}},function(t,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),r.d(n,"check",function(){return b}),r.d(n,"pick",function(){return g}),r.d(n,"put",function(){return m}),r.d(n,"fix",function(){return x}),r.d(n,"parse",function(){return S});var e=r(36),o=r.n(e),i=/[^a-zA-Z0-9ㄱ-ㅎ가-힣\s]+/g,u=/^[\s\S]*?(\S*)\s*$/,c=new RegExp("(?:"+["check|[hm]ook|limit"].join("|")+")$","i"),f=new RegExp("(?:"+["[ㄱ-ㄷㅁ-ㅎ036]","^[mn]","\\S[mn]e?","\\S(?:[aeiom]|lu)b","(?:u|\\S[aei]|[^o]o)p","(?:^i|[^auh]i|\\Su|[^ei][ae]|[^oi]o)t","(?:\\S[iou]|[^e][ae])c?k","\\S[aeiou](?:c|ng)","foot|go+d|b[ai]g|private","^(?:app|kor)"].join("|")+")$","i"),a=new RegExp("(?:"+["[178ㄹ]","^[lr]","^\\Sr","\\Sle?"].join("|")+")$","i"),s=/(\S*)\[([\w가-힣]*)\|([\w가-힣]*)\]/g,p={"은":"는","이":"가","과":"와","이나":"나","을":"를","으로":"로"},l=function(){var t={};for(var n in p)t[p[n]]=n;return t}(),y=function(t,n){return!c.test(t)&&(f.test(t)||!n&&a.test(t))},v=function(t,n){var r=(t-44032)%28;return 0!==r&&!(n&&8===r)},h=function(t){var n=void 0===t?"undefined":o()(t);return"string"!==n&&"number"!==n},d=function(t,n,r,e){return m(n,r,e)},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(h(t))return!1;var r=String(t).replace(i," ").replace(u,"$1"),e=r.charAt(r.length-1).charCodeAt(),o=44032<=e&&e<=55203,c="로"===n||"으로"===n;return o?v(e,c):y(r,c)},g=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"string"!=typeof r&&(n=p[n]||n||"",r=l[n]||n),b(String(t),n)?r:n},m=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return""+t+g(t,n,r)},x=function(t,n){return function(r){return m(r,t,n)}},S=function(t){return"string"==typeof t?t.replace(s,d):t};n.default={check:b,pick:g,put:m,fix:x,parse:S}},function(t,n,r){t.exports={default:r(40),__esModule:!0}},function(t,n,r){t.exports={default:r(41),__esModule:!0}},function(t,n,r){r(64),r(62),r(65),r(66),t.exports=r(12).Symbol},function(t,n,r){r(63),r(67),t.exports=r(25).f("iterator")},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){t.exports=function(){}},function(t,n,r){var e=r(5),o=r(59),i=r(58);t.exports=function(t){return function(n,r,u){var c,f=e(n),a=o(f.length),s=i(u,a);if(t&&r!=r){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===r)return t||s||0;return!t&&-1}}},function(t,n,r){var e=r(42);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n,r){var e=r(17),o=r(33),i=r(18);t.exports=function(t){var n=e(t),r=o.f;if(r)for(var u,c=r(t),f=i.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,r){var e=r(0).document;t.exports=e&&e.documentElement},function(t,n,r){var e=r(26);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(26);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){"use strict";var e=r(31),o=r(10),i=r(19),u={};r(3)(u,r(6)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:o(1,r)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){var e=r(11)("meta"),o=r(7),i=r(1),u=r(4).f,c=0,f=Object.isExtensible||function(){return!0},a=!r(9)(function(){return f(Object.preventExtensions({}))}),s=function(t){u(t,e,{value:{i:"O"+ ++c,w:{}}})},p=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,e)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[e].i},l=function(t,n){if(!i(t,e)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[e].w},y=function(t){return a&&v.NEED&&f(t)&&!i(t,e)&&s(t),t},v=t.exports={KEY:e,NEED:!1,fastKey:p,getWeak:l,onFreeze:y}},function(t,n,r){var e=r(4),o=r(8),i=r(17);t.exports=r(2)?Object.defineProperties:function(t,n){o(t);for(var r,u=i(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){var e=r(18),o=r(10),i=r(5),u=r(23),c=r(1),f=r(29),a=Object.getOwnPropertyDescriptor;n.f=r(2)?a:function(t,n){if(t=i(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return o(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(5),o=r(32).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(e(t))}},function(t,n,r){var e=r(1),o=r(60),i=r(20)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),e(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,r){var e=r(22),o=r(13);t.exports=function(t){return function(n,r){var i,u,c=String(o(n)),f=e(r),a=c.length;return f<0||f>=a?t?"":void 0:(i=c.charCodeAt(f),i<55296||i>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536)}}},function(t,n,r){var e=r(22),o=Math.max,i=Math.min;t.exports=function(t,n){return t=e(t),t<0?o(t+n,0):i(t,n)}},function(t,n,r){var e=r(22),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){var e=r(13);t.exports=function(t){return Object(e(t))}},function(t,n,r){"use strict";var e=r(43),o=r(51),i=r(15),u=r(5);t.exports=r(30)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,r):"values"==n?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,e("keys"),e("values"),e("entries")},function(t,n){},function(t,n,r){"use strict";var e=r(57)(!0);r(30)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})})},function(t,n,r){"use strict";var e=r(0),o=r(1),i=r(2),u=r(28),c=r(35),f=r(52).KEY,a=r(9),s=r(21),p=r(19),l=r(11),y=r(6),v=r(25),h=r(24),d=r(46),b=r(49),g=r(8),m=r(7),x=r(5),S=r(23),O=r(10),w=r(31),_=r(55),j=r(54),P=r(4),E=r(17),L=j.f,M=P.f,k=_.f,T=e.Symbol,A=e.JSON,F=A&&A.stringify,N=y("_hidden"),C=y("toPrimitive"),I={}.propertyIsEnumerable,R=s("symbol-registry"),D=s("symbols"),G=s("op-symbols"),V=Object.prototype,W="function"==typeof T,$=e.QObject,H=!$||!$.prototype||!$.prototype.findChild,J=i&&a(function(){return 7!=w(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=L(V,n);e&&delete V[n],M(t,n,r),e&&t!==V&&M(V,n,e)}:M,z=function(t){var n=D[t]=w(T.prototype);return n._k=t,n},B=W&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},K=function(t,n,r){return t===V&&K(G,n,r),g(t),n=S(n,!0),g(r),o(D,n)?(r.enumerable?(o(t,N)&&t[N][n]&&(t[N][n]=!1),r=w(r,{enumerable:O(0,!1)})):(o(t,N)||M(t,N,O(1,{})),t[N][n]=!0),J(t,n,r)):M(t,n,r)},Y=function(t,n){g(t);for(var r,e=d(n=x(n)),o=0,i=e.length;i>o;)K(t,r=e[o++],n[r]);return t},q=function(t,n){return void 0===n?w(t):Y(w(t),n)},Q=function(t){var n=I.call(this,t=S(t,!0));return!(this===V&&o(D,t)&&!o(G,t))&&(!(n||!o(this,t)||!o(D,t)||o(this,N)&&this[N][t])||n)},U=function(t,n){if(t=x(t),n=S(n,!0),t!==V||!o(D,n)||o(G,n)){var r=L(t,n);return!r||!o(D,n)||o(t,N)&&t[N][n]||(r.enumerable=!0),r}},Z=function(t){for(var n,r=k(x(t)),e=[],i=0;r.length>i;)o(D,n=r[i++])||n==N||n==f||e.push(n);return e},X=function(t){for(var n,r=t===V,e=k(r?G:x(t)),i=[],u=0;e.length>u;)!o(D,n=e[u++])||r&&!o(V,n)||i.push(D[n]);return i};W||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),n=function(r){this===V&&n.call(G,r),o(this,N)&&o(this[N],t)&&(this[N][t]=!1),J(this,t,O(1,r))};return i&&H&&J(V,t,{configurable:!0,set:n}),z(t)},c(T.prototype,"toString",function(){return this._k}),j.f=U,P.f=K,r(32).f=_.f=Z,r(18).f=Q,r(33).f=X,i&&!r(16)&&c(V,"propertyIsEnumerable",Q,!0),v.f=function(t){return z(y(t))}),u(u.G+u.W+u.F*!W,{Symbol:T});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)y(tt[nt++]);for(var rt=E(y.store),et=0;rt.length>et;)h(rt[et++]);u(u.S+u.F*!W,"Symbol",{for:function(t){return o(R,t+="")?R[t]:R[t]=T(t)},keyFor:function(t){if(!B(t))throw TypeError(t+" is not a symbol!");for(var n in R)if(R[n]===t)return n},useSetter:function(){H=!0},useSimple:function(){H=!1}}),u(u.S+u.F*!W,"Object",{create:q,defineProperty:K,defineProperties:Y,getOwnPropertyDescriptor:U,getOwnPropertyNames:Z,getOwnPropertySymbols:X}),A&&u(u.S+u.F*(!W||a(function(){var t=T();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){for(var n,r,e=[t],o=1;arguments.length>o;)e.push(arguments[o++]);if(r=n=e[1],(m(n)||void 0!==t)&&!B(t))return b(n)||(n=function(t,n){if("function"==typeof r&&(n=r.call(this,t,n)),!B(n))return n}),e[1]=n,F.apply(A,e)}}),T.prototype[C]||r(3)(T.prototype,C,T.prototype.valueOf),p(T,"Symbol"),p(Math,"Math",!0),p(e.JSON,"JSON",!0)},function(t,n,r){r(24)("asyncIterator")},function(t,n,r){r(24)("observable")},function(t,n,r){r(61);for(var e=r(0),o=r(3),i=r(15),u=r(6)("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),f=0;f<c.length;f++){var a=c[f],s=e[a],p=s&&s.prototype;p&&!p[u]&&o(p,u,a),i[a]=i.Array}}])});
{
"name": "cox-postposition",
"version": "1.0.2",
"version": "1.1.0",
"description": "한글, 영문, 숫자에 대한 한글 조사를 처리하는 Javascript Library 입니다.",

@@ -5,0 +5,0 @@ "main": "src/postposition.js",

@@ -6,3 +6,3 @@ # cox.postposition

[예제 보기](https://cdn.rawgit.com/coxcore/postposition/1.0.2/demo/index.html)
[예제 보기](https://cdn.rawgit.com/coxcore/postposition/1.1.0/demo/index.html)

@@ -22,3 +22,3 @@ ## 설치하기

```html
https://cdn.rawgit.com/coxcore/postposition/1.0.2/dist/cox.postposition.min.js
https://cdn.rawgit.com/coxcore/postposition/1.1.0/dist/cox.postposition.min.js
```

@@ -39,2 +39,3 @@

const num = postposition.put('8', '을');
const sentence = postposition.parse('바다[로|으로] 이동하면 잠수함[를|을] 얻습니다.');

@@ -44,2 +45,3 @@ console.log(kor); // 고양이를

console.log(num); // 8을
console.log(sentence); // 바다로 이동하면 잠수함을 얻습니다.
```

@@ -55,2 +57,3 @@

const num = postposition.put('8', '을');
const sentence = postposition.parse('바다[로|으로] 이동하면 잠수함[를|을] 얻습니다.');

@@ -60,2 +63,3 @@ console.log(kor); // 고양이를

console.log(num); // 8을
console.log(sentence); // 바다로 이동하면 잠수함을 얻습니다.
```

@@ -66,3 +70,3 @@

```html
<script src="https://cdn.rawgit.com/coxcore/postposition/1.0.2/dist/cox.postposition.min.js"></script>
<script src="https://cdn.rawgit.com/coxcore/postposition/1.1.0/dist/cox.postposition.min.js"></script>

@@ -73,2 +77,3 @@ <script>

var num = cox.postposition.put('8', '을');
var sentence = cox.postposition.parse('바다[로|으로] 이동하면 잠수함[를|을] 얻습니다.');

@@ -78,2 +83,3 @@ console.log(kor); // 고양이를

console.log(num); // 8을
console.log(sentence); // 바다로 이동하면 잠수함을 얻습니다.
</script>

@@ -111,2 +117,7 @@ ```

// 입력한 문장에서 조사 적용
postposition.parse('예제1[와|과] 예제2[를|을] 확인하세요.'); // 예제1과 예제2를 확인하세요.
postposition.parse('예제[1][와|과] 예제[2][를|을] 확인하세요.'); // 예제[1]과 예제[2]를 확인하세요.
postposition.parse('음식[|이]면 A, food[|이]면 B'); // 음식이면 A, food면 B
// 지정한 조사만 처리하는 함수 생성

@@ -125,3 +136,3 @@ const putEul = postposition.fix('을');

```js
import { check, pick, put, fix } from 'cox-postposition';
import { check, pick, put, parse, fix } from 'cox-postposition';

@@ -137,2 +148,6 @@ // 종성이 있는지 여부

// 입력한 문장에 조사 적용
parse('하늘[와|과] 땅'); // 하늘과 땅
// 지정한 조사만 처리 함수 생성

@@ -288,2 +303,19 @@ const putEul = fix('을');

### parse( sentence )
> 문장에서 `단어[ 종성이 없을 때 조사 | 종성이 있을 때 조사 ]` 패턴을 찾아서 해당 단어의 조사를 처리합니다.
* `sentence`: 처리할 문장
문장에서 특정 단어에 대한 조사를 처리할 때 사용할 수 있습니다.
```js
const result1 = postposition.parse('망치[를|을] 만드려면 손잡이[가|이] 필요합니다.');
const result2 = postposition.parse('그림[P][와|과] 그림[L][는|은] animal[를|을] 포함합니다.');
console.log(result1); // 망치를 만드려면 손잡이가 필요합니다.
console.log(result2); // 그림[P]와 그림[L]은 animal을 포함합니다.
```
## Guide

@@ -290,0 +322,0 @@

@@ -83,2 +83,10 @@ /**

/**
* 조사를 처리할 단어를 찾는 정규식
*
* @private
* @type {RegExp}
*/
const REG_PARSER_PATTERN = /(\S*)\[([\w가-힣]*)\|([\w가-힣]*)\]/g;
/**
* 기본적으로 지원하는 조사

@@ -148,11 +156,39 @@ *

/**
* 문자열로 사용 가능한지 여부 체크
*
* @private
* @param text {string}
* @returns {boolean}
*/
const invalidText = text => {
const type = typeof text;
return type !== 'string' && type !== 'number';
};
/**
* 문장에서 찾은 패턴을 처리하는 callback function
*
* @private
* @param target 패턴과 일치하는 문자열
* @param word 대상 단어
* @param normal 종성이 없을 때 조사
* @param special 종성이 있을 때 조사
*/
const callbackParser = (target, word, normal, special) => put(word, normal, special);
/**
* 종성이 있는 문자열인지 여부
* '로/으로'의 경우가 아니면 type 파라미터를 생략해도 된다.
*
* @param text 체크할 문자열
* @param type 조사('로/으로'의 경우가 아니면 type 파라미터를 생략)
* @param text {string} 체크할 문자열
* @param type {string|null} 조사('로/으로'의 경우가 아니면 type 파라미터를 생략)
* @returns {boolean}
*/
export const check = (text, type) => {
const target = text.replace(REG_INVALID_CHAR, " ").replace(REG_TARGET_CHAR, "$1");
export const check = (text, type = null) => {
if (invalidText(text)) {
return false;
}
const target = String(text).replace(REG_INVALID_CHAR, " ").replace(REG_TARGET_CHAR, "$1");
const code = target.charAt(target.length - 1).charCodeAt();

@@ -168,10 +204,10 @@ const isKorean = KO_START_CODE <= code && code <= KO_FINISH_CODE;

* 아래 조사에 대해서는 special 파라미터를 전달하지 않아도 된다.
* 은/는, 이/가, 을/를, 과/와, 로/으로
* 은/는, 이/가, 을/를, 과/와, 나/이나, 로/으로
*
* @param text {string} 조사를 붙일 문자열
* @param type {string} 조사
* @param special {string} 종성이 있을 때 조사
* @param special {string|null} 종성이 있을 때 조사
* @returns {string}
*/
export const pick = (text, type, special) => {
export const pick = (text, type, special = null) => {
if (typeof special !== "string") {

@@ -182,3 +218,3 @@ type = DEFAULT_POSTPOSITION[type] || type || "";

return check(text, type) ? special : type;
return check(String(text), type) ? special : type;
};

@@ -192,6 +228,6 @@

* @param type {string} 조사
* @param special {string} 종성이 있을 때 조사
* @param special {string|null} 종성이 있을 때 조사
* @return {string}
*/
export const put = (text, type, special) => `${text}${pick(text, type, special)}`;
export const put = (text, type, special = null) => `${text}${pick(text, type, special)}`;

@@ -204,7 +240,20 @@ /**

* @param special {string} 종성이 없을 때 조사
* @return {function}
*/
export const fix = (type, special) => (text => put(text, type, special));
/**
* 문자열에서 특정 패턴을 찾아 해당 문자에 맞는 조사를 처리
* 찾는 패턴 : 단어[ 종성이 없을 때 조사 | 종성이 있을 때 조사 ]
* ex) 문자열[를|을] 변경 => 문자열을 변경
*
* @param sentence 처리할 문자열
* @returns {string|*}
*/
export const parse = (sentence) => (typeof sentence === 'string') ?
sentence.replace(REG_PARSER_PATTERN, callbackParser) : sentence;
export default {
check, pick, put, fix
check, pick, put, fix, parse
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc