Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amanatsu

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amanatsu - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/amanatsu-loader.js

2

dist/amanatsu.js

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

window.Amanatsu=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="/",n(n.s=13)}([function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},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){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(3),o=r(0),i=r(21),u=r(25),c=function(t,n,r){var s,f,a,p=t&c.F,l=t&c.G,d=t&c.S,h=t&c.P,v=t&c.B,y=t&c.W,_=l?o:o[n]||(o[n]={}),b=_.prototype,g=l?e:d?e[n]:(e[n]||{}).prototype;l&&(r=n);for(s in r)(f=!p&&g&&void 0!==g[s])&&s in _||(a=f?g[s]:r[s],_[s]=l&&"function"!=typeof g[s]?r[s]:v&&f?i(a,e):y&&g[s]==a?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}(a):h&&"function"==typeof a?i(Function.call,a):a,h&&((_.virtual||(_.virtual={}))[s]=a,t&c.R&&b&&!b[s]&&u(b,s,a)))};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){var e=r(18),o=r(26),i=r(37),u=Object.defineProperty;n.f=r(1)?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){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(27),o=r(5);t.exports=function(t){return e(o(t))}},function(t,n,r){t.exports={default:r(16),__esModule:!0}},function(t,n,r){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n,r){"use strict";n.__esModule=!0;var e=r(14),o=function(t){return t&&t.__esModule?t:{default:t}}(e);n.default=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),(0,o.default)(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}()},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}var o=r(10),i=e(o),u=r(11),c=e(u),s=r(12),f=e(s),a=function(){function t(n){(0,c.default)(this,t),this.defaultOptions={joshi:/(でなければ|について|かしら|くらい|けれど|なのか|ばかり|ながら|ことよ|こそ|こと|さえ|しか|した|たり|だけ|だに|だの|つつ|ても|てよ|でも|とも|から|など|なり|ので|のに|ほど|まで|もの|やら|より|って|で|と|な|に|ね|の|も|は|ば|へ|や|わ|を|か|が|さ|し|ぞ|て)/g,keywords:/(&nbsp;|[a-zA-Z0-9]+\.[a-z]{2,}|[一-龠々〆ヵヶゝ]+|[ぁ-んゝ]+|[ァ-ヴー]+|[a-zA-Z0-9]+|[a-zA-Z0-9]+)/g,periods:/([.,。、!!??]+)$/g,bracketsBegin:/([((「『【《])/g,bracketsEnd:/([))」』】》])/g,style:"display:inline-block",role:"presentation",className:""},this.setOptions(n)}return(0,f.default)(t,[{key:"setOptions",value:function(t){var n=this;t?(this._options={},(0,i.default)(this.defaultOptions).forEach(function(r){n._options[r]=void 0===t[r]?n.defaultOptions[r]:t[r]})):this._options=this.defaultOptions,this._attr="",this._options.style&&(this._attr+=' style="'+this._options.style+'"'),this._options.role&&(this._attr+=' role="'+this._options.role+'"'),this._options.className&&(this._attr+=' class="'+this._options.className+'"')}},{key:"apply",value:function(t){return"string"==typeof t?this._applyAsString(t):t instanceof Node?this._applyAsNode(t):t}},{key:"split",value:function(t){return this._stringToWords(t)}},{key:"_applyAsString",value:function(t){var n=this._stringToWords(t);return this._wordsToHtml(n)}},{key:"_applyAsNode",value:function(t){var n=this;return(0,i.default)(t.childNodes).forEach(function(r){var e=t.childNodes[r];if(e.nodeType===Node.TEXT_NODE){var o=e.textContent.trim();if(0===o.length)return;var i=document.createElement("div");for(i.innerHTML=n._applyAsString(o);i.firstChild;)t.insertBefore(i.firstChild,e);t.removeChild(e)}else e.nodeType===Node.ELEMENT_NODE&&n._applyAsNode(e)})}},{key:"_wordsToHtml",value:function(t){var n=this;return t.map(function(t){return"<span"+n._attr+">"+t+"</span>"}).join("")}},{key:"_stringToWords",value:function(t){var n=this,r=t.trim().split(this._options.keywords).reduce(function(t,r){return[].concat(t,r.split(n._options.joshi))}).reduce(function(t,r){return[].concat(t,r.split(n._options.bracketsBegin))}).reduce(function(t,r){return[].concat(t,r.split(n._options.bracketsEnd))}).filter(function(t){return t}),e=[],o="",i="";return r.forEach(function(t){var r=t.match(n._options.periods)||t.match(n._options.joshi);return t.match(n._options.bracketsBegin)?(o="bracketBegin",void(i=t)):t.match(n._options.bracketsEnd)?(e[e.length-1]+=t,o="bracketEnd",void(i=t)):("bracketBegin"===o&&(t=i+t,i="",o=""),e.length>0&&r&&""===o?(e[e.length-1]+=t,o="keyword",void(i=t)):e.length>0&&(r||"keyword"===o&&t.match(/[ぁ-んゝ]+/g))?(e[e.length-1]+=t,o="",void(i=t)):(e.push(t),o="keyword",void(i=t)))}),e}}]),t}();t.exports=a},function(t,n,r){t.exports={default:r(15),__esModule:!0}},function(t,n,r){r(39);var e=r(0).Object;t.exports=function(t,n,r){return e.defineProperty(t,n,r)}},function(t,n,r){r(40),t.exports=r(0).Object.keys},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){var e=r(9),o=r(35),i=r(34);t.exports=function(t){return function(n,r,u){var c,s=e(n),f=o(s.length),a=i(u,f);if(t&&r!=r){for(;f>a;)if((c=s[a++])!=c)return!0}else for(;f>a;a++)if((t||a in s)&&s[a]===r)return t||a||0;return!t&&-1}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(17);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(4),o=r(3).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(7),o=r(31);t.exports=r(1)?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){t.exports=!r(1)&&!r(2)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(24),o=r(9),i=r(19)(!1),u=r(32)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),s=0,f=[];for(r in c)r!=u&&e(c,r)&&f.push(r);for(;n.length>s;)e(c,r=n[s++])&&(~i(f,r)||f.push(r));return f}},function(t,n,r){var e=r(28),o=r(23);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){var e=r(6),o=r(0),i=r(2);t.exports=function(t,n){var r=(o.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*i(function(){r(1)}),"Object",u)}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(33)("keys"),o=r(38);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n,r){var e=r(3),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){var e=r(8),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(8),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){var e=r(5);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(4);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){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(6);e(e.S+e.F*!r(1),"Object",{defineProperty:r(7).f})},function(t,n,r){var e=r(36),o=r(29);r(30)("keys",function(){return function(t){return o(e(t))}})}]);
window.Amanatsu=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="/",n(n.s=10)}([function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},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){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(3),o=r(0),i=r(21),u=r(25),c=function(t,n,r){var s,f,a,p=t&c.F,l=t&c.G,d=t&c.S,h=t&c.P,v=t&c.B,y=t&c.W,_=l?o:o[n]||(o[n]={}),g=_.prototype,b=l?e:d?e[n]:(e[n]||{}).prototype;l&&(r=n);for(s in r)(f=!p&&b&&void 0!==b[s])&&s in _||(a=f?b[s]:r[s],_[s]=l&&"function"!=typeof b[s]?r[s]:v&&f?i(a,e):y&&b[s]==a?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}(a):h&&"function"==typeof a?i(Function.call,a):a,h&&((_.virtual||(_.virtual={}))[s]=a,t&c.R&&g&&!g[s]&&u(g,s,a)))};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){var e=r(18),o=r(26),i=r(37),u=Object.defineProperty;n.f=r(1)?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){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(27),o=r(5);t.exports=function(t){return e(o(t))}},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}var o=r(11),i=e(o),u=r(12),c=e(u),s=r(13),f=e(s),a=function(){function t(n){(0,c.default)(this,t),this.defaultOptions={joshi:/(でなければ|について|かしら|くらい|けれど|なのか|ばかり|ながら|ことよ|こそ|こと|さえ|しか|した|たり|だけ|だに|だの|つつ|ても|てよ|でも|とも|から|など|なり|ので|のに|ほど|まで|もの|やら|より|って|で|と|な|に|ね|の|も|は|ば|へ|や|わ|を|か|が|さ|し|ぞ|て)/g,keywords:/(&nbsp;|[a-zA-Z0-9]+\.[a-z]{2,}|[一-龠々〆ヵヶゝ]+|[ぁ-んゝ]+|[ァ-ヴー]+|[a-zA-Z0-9]+|[a-zA-Z0-9]+)/g,periods:/([.,。、!!??]+)$/g,bracketsBegin:/([((「『【《])/g,bracketsEnd:/([))」』】》])/g,style:"display:inline-block",role:"presentation",className:""},this.setOptions(n)}return(0,f.default)(t,[{key:"setOptions",value:function(t){var n=this;t?(this._options={},(0,i.default)(this.defaultOptions).forEach(function(r){n._options[r]=void 0===t[r]?n.defaultOptions[r]:t[r]})):this._options=this.defaultOptions,this._attr="",this._options.style&&(this._attr+=' style="'+this._options.style+'"'),this._options.role&&(this._attr+=' role="'+this._options.role+'"'),this._options.className&&(this._attr+=' class="'+this._options.className+'"')}},{key:"apply",value:function(t){return"string"==typeof t?this._applyAsString(t):t instanceof Node?this._applyAsNode(t):t}},{key:"split",value:function(t){return this._stringToWords(t)}},{key:"_applyAsString",value:function(t){var n=this._stringToWords(t);return this._wordsToHtml(n)}},{key:"_applyAsNode",value:function(t){var n=this;Array.prototype.slice.call(t.childNodes).forEach(function(r){if(r.nodeType===Node.TEXT_NODE){var e=r.textContent.trim();if(0===e.length)return;var o=document.createElement("div");for(o.innerHTML=n._applyAsString(e);o.firstChild;)t.insertBefore(o.firstChild,r);t.removeChild(r)}else r.nodeType===Node.ELEMENT_NODE&&r.childNodes.length>0&&n._applyAsNode(r)})}},{key:"_wordsToHtml",value:function(t){var n=this;return t.map(function(t){return"<span"+n._attr+">"+t+"</span>"}).join("")}},{key:"_stringToWords",value:function(t){var n=this,r=t.trim().split(this._options.keywords);if(r.length<2)return r;var e=r.reduce(function(t,r){return[].concat(t,r.split(n._options.joshi))}).reduce(function(t,r){return[].concat(t,r.split(n._options.bracketsBegin))}).reduce(function(t,r){return[].concat(t,r.split(n._options.bracketsEnd))}).filter(function(t){return t}),o=[],i="",u="";return e.forEach(function(t){var r=t.match(n._options.periods)||t.match(n._options.joshi);return t.match(n._options.bracketsBegin)?(i="bracketBegin",void(u=t)):t.match(n._options.bracketsEnd)?(o[o.length-1]+=t,i="bracketEnd",void(u=t)):("bracketBegin"===i&&(t=u+t,u="",i=""),o.length>0&&r&&""===i?(o[o.length-1]+=t,i="keyword",void(u=t)):o.length>0&&(r||"keyword"===i&&t.match(/[ぁ-んゝ]+/g))?(o[o.length-1]+=t,i="",void(u=t)):(o.push(t),i="keyword",void(u=t)))}),o}}]),t}();t.exports=a},function(t,n,r){t.exports={default:r(16),__esModule:!0}},function(t,n,r){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n,r){"use strict";n.__esModule=!0;var e=r(14),o=function(t){return t&&t.__esModule?t:{default:t}}(e);n.default=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),(0,o.default)(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}()},function(t,n,r){t.exports={default:r(15),__esModule:!0}},function(t,n,r){r(39);var e=r(0).Object;t.exports=function(t,n,r){return e.defineProperty(t,n,r)}},function(t,n,r){r(40),t.exports=r(0).Object.keys},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){var e=r(9),o=r(35),i=r(34);t.exports=function(t){return function(n,r,u){var c,s=e(n),f=o(s.length),a=i(u,f);if(t&&r!=r){for(;f>a;)if((c=s[a++])!=c)return!0}else for(;f>a;a++)if((t||a in s)&&s[a]===r)return t||a||0;return!t&&-1}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(17);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(4),o=r(3).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(7),o=r(31);t.exports=r(1)?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){t.exports=!r(1)&&!r(2)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(24),o=r(9),i=r(19)(!1),u=r(32)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),s=0,f=[];for(r in c)r!=u&&e(c,r)&&f.push(r);for(;n.length>s;)e(c,r=n[s++])&&(~i(f,r)||f.push(r));return f}},function(t,n,r){var e=r(28),o=r(23);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){var e=r(6),o=r(0),i=r(2);t.exports=function(t,n){var r=(o.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*i(function(){r(1)}),"Object",u)}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(33)("keys"),o=r(38);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n,r){var e=r(3),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){var e=r(8),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(8),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){var e=r(5);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(4);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){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(6);e(e.S+e.F*!r(1),"Object",{defineProperty:r(7).f})},function(t,n,r){var e=r(36),o=r(29);r(30)("keys",function(){return function(t){return o(e(t))}})}]);
{
"name": "amanatsu",
"version": "0.1.0",
"version": "0.1.1",
"description": "Japanese Line Break Organizer",

@@ -14,2 +14,3 @@ "main": "src/index.js",

"devDependencies": {
"array.from": "^1.0.3",
"assert": "^1.4.1",

@@ -16,0 +17,0 @@ "ava": "^0.19.1",

@@ -54,5 +54,3 @@ class Amanatsu {

_applyAsNode (node) {
return Object.keys(node.childNodes).forEach(index => {
const child = node.childNodes[index]
Array.prototype.slice.call(node.childNodes).forEach(child => {
if (child.nodeType === Node.TEXT_NODE) {

@@ -71,3 +69,3 @@ const text = child.textContent.trim()

node.removeChild(child)
} else if (child.nodeType === Node.ELEMENT_NODE) {
} else if (child.nodeType === Node.ELEMENT_NODE && child.childNodes.length > 0) {
this._applyAsNode(child)

@@ -85,3 +83,7 @@ }

_stringToWords (str) {
const words = str.trim().split(this._options.keywords).reduce((prev, word) => {
const base = str.trim().split(this._options.keywords)
if (base.length < 2) {
return base
}
const words = base.reduce((prev, word) => {
return [].concat(prev, word.split(this._options.joshi))

@@ -88,0 +90,0 @@ }).reduce((prev, word) => {

@@ -11,3 +11,4 @@ const path = require('path')

entry: {
'amanatsu': path.join(dir.src, 'index.js')
'amanatsu': path.join(dir.src, 'index.js'),
'amanatsu-loader': path.join(dir.src, 'loader.js')
},

@@ -14,0 +15,0 @@ output: {

Sorry, the diff of this file is not supported yet

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