@okeyamy/lua 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ /**
2
+ lua - A client side A/B tester
3
+ @version v5.0.3
4
+ @link https://github.com/OkeyAmy/Lua-Dynamic-Website-
5
+ @author Okey Amy <amaobiokeoma@gmail.com>
6
+ @license MIT
7
+ **/
8
+ ((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Lua=t()})(this,function(){function o(t){var e=Object.keys(t.buckets),r=[],n=(e.forEach(function(e){e=t.buckets[e].weight;r.push(e=null==e?1:e)}),e),i=r;if(n.length!==i.length)throw new Error("names and weights must have equal length!");for(var e=i.reduce(function(e,t){return e+t},0),s=0,o=m(0,e),a=0;a<n.length;a++)if(o<=(s+=i[a]))return n[a];return n[n.length-1]}var i,n,s,u,a,c,l,f,r,d,m=function(e,t){return Math.random()*(t-e)+e},e=(()=>{function e(e){void 0===e&&(e={}),Object.assign(this,{storageKey:"ab-tests",root:"undefined"!=typeof document?document.body:null},e);e=this.store;if(!e)throw new Error("You must supply a store!");if("function"!=typeof e.get)throw new Error("The store must implement .get()");if("function"!=typeof e.set)throw new Error("The store must implement .set()");if("function"!=typeof e.isSupported)throw new Error("The store must implement .isSupported()");if(!e.isSupported())throw new Error("The store is not supported.");this.previousAssignments={};try{var t=this.store.get(this.storageKey);"string"==typeof t&&"{"===t[0]&&(this.previousAssignments=JSON.parse(t))}catch(e){}this.userAssignments={},this.persistedUserAssignments={},this.providedTests=[]}var t=e.prototype;return t.define=function(e){var t=this,r=e;(r=Array.isArray(e)?r:[e]).forEach(function(e){if(!e.name)throw new Error("Tests must have a name");if(!e.buckets)throw new Error("Tests must have buckets");if(!Object.keys(e.buckets))throw new Error("Tests must have buckets");t.providedTests.push(e)})},t.definitions=function(){return this.providedTests},t.removeClasses=function(t,r){try{var n=this.root;n&&n.className.split(/\s+/g).map(function(e){return e.trim()}).filter(Boolean).filter(function(e){return 0===e.indexOf(t+"--")}).filter(function(e){return e!==r}).forEach(function(e){return n.classList.remove(e)})}catch(e){}},t.applyClasses=function(){var r=this;try{var n=this.userAssignments,i=this.root;i&&Object.keys(n).forEach(function(e){var t=n[e],t=t?e+"--"+t:null;r.removeClasses(e,t),t&&i.classList.add(t)})}catch(e){}},t.assignAll=function(){var n=this.previousAssignments,i=this.userAssignments,s=this.persistedUserAssignments;this.providedTests.forEach(function(t){var r,e=Object.keys(t.buckets).filter(function(e){return t.buckets[e].winner})[0];e?i[t.name]=e:i[t.name]||((e=n[t.name])&&t.buckets[e]?(e=n[t.name],s[t.name]=e,i[t.name]=e,t.active=!0):!1===t.active?i[t.name]=(r=t.buckets,Object.keys(r).filter(function(e){e=r[e];return e.default||e.winner})[0]||Object.keys(r)[0]):(e=o(t),s[t.name]=e,i[t.name]=e))}),this.persist(),this.applyClasses()},t.assign=function(t,e){if(!t)return this.assignAll();var r=this.providedTests.filter(function(e){return e.name===t})[0];null!==e&&r?(e=e||o(r),this.userAssignments[t]=e,this.persistedUserAssignments[t]=e,r.active=!0,this.persist(),this.applyClasses()):(delete this.userAssignments[t],delete this.persistedUserAssignments[t],this.persist(),this.removeClasses(t))},t.extendAssignments=function(e){return e},t.assignments=function(){return this.extendAssignments(this.userAssignments)},t.persist=function(){this.store.set(this.storageKey,JSON.stringify(this.persistedUserAssignments))},t.getUTMContext=function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:{};return e.LuaUTM&&"function"==typeof e.LuaUTM.getContext?e.LuaUTM.getContext():{utm:{},referrer:{},userAgent:{},primaryIntent:"default",hasUTM:!1}}catch(e){return{utm:{},referrer:{},userAgent:{},primaryIntent:"default",hasUTM:!1}}},t.getUTMBasedBucket=function(e,t){if(!t||!t.hasUTM)return null;var r=e.utmRules||{};if(t.utm.utm_campaign){var n=r[t.utm.utm_campaign];if(n&&e.buckets[n])return n}if(t.utm.utm_source){n=r[t.utm.utm_source];if(n&&e.buckets[n])return n}r=t.primaryIntent;return r&&e.buckets[r]?r:(n=e.intentMapping||{},r&&n[r]&&e.buckets[n[r]]?n[r]:null)},t.assignWithUTM=function(t,e){var r,n,e=(e=void 0===e?{}:e).context||this.getUTMContext();return t?(r=this.providedTests.filter(function(e){return e.name===t})[0])?(n=Object.keys(r.buckets).filter(function(e){return r.buckets[e].winner})[0])?(this.userAssignments[t]=n,this.persist(),this.applyClasses(),{assignment:n,source:"winner"}):(n=this.previousAssignments[t])&&r.buckets[n]?(this.userAssignments[t]=n,this.persistedUserAssignments[t]=n,r.active=!0,this.persist(),this.applyClasses(),{assignment:n,source:"persisted"}):(n=this.getUTMBasedBucket(r,e))?(this.userAssignments[t]=n,this.persistedUserAssignments[t]=n,r.active=!0,this.persist(),this.applyClasses(),{assignment:n,source:"utm",intent:e.primaryIntent}):(n=o(r),this.userAssignments[t]=n,this.persistedUserAssignments[t]=n,r.active=!0,this.persist(),this.applyClasses(),{assignment:n,source:"random"}):{assignment:null,source:"none"}:this.assignAllWithUTM(e)},t.assignAllWithUTM=function(r){var n=this,i=(r=r||this.getUTMContext(),{});return this.providedTests.forEach(function(e){var t=n.assignWithUTM(e.name,{context:r});i[e.name]=t}),i},e})();function t(e){var r={};try{var t=e||("undefined"!=typeof window?window.location.search:"");if(!t)return r;var n=new URLSearchParams(t);i.forEach(function(e){var t=n.get(e);t&&(r[e]=g(t))})}catch(e){console.warn("[Lua UTM] Error extracting UTM params:",e)}return r}function g(e){return"string"!=typeof e?"":e.replace(/<[^>]*>/g,"").replace(/[^\w\s\-_.]/g,"").substring(0,100).trim()}function p(){var e={source:"direct",category:"direct",url:""};try{if("undefined"==typeof document||!document.referrer)return e;if(e.url=document.referrer,/mail\.|email\.|newsletter/i.test(document.referrer))return e.source="email",e.category="email",e;for(var t in n)if(n[t].test(document.referrer)){for(var r in e.source=t,s)if(-1!==s[r].indexOf(t)){e.category=r;break}return e}e.source="external",e.category="other"}catch(e){console.warn("[Lua UTM] Error detecting referrer:",e)}return e}function h(){var e={raw:"",isMobile:!1,isTablet:!1,isDesktop:!0};try{if("undefined"==typeof navigator||!navigator.userAgent)return e;e.raw=navigator.userAgent,e.isMobile=/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),e.isTablet=/iPad|Android(?!.*Mobile)/i.test(navigator.userAgent),e.isDesktop=!e.isMobile&&!e.isTablet}catch(e){console.warn("[Lua UTM] Error getting user agent:",e)}return e}function y(e){e={utm:t((e=e||{}).url),referrer:p(),userAgent:h(),timestamp:Date.now(),hasUTM:!1,primaryIntent:"unknown"};return e.hasUTM=0<Object.keys(e.utm).length,e.primaryIntent=b(e),e}function b(e){if(e.utm.utm_campaign){var t=e.utm.utm_campaign.toLowerCase();if(/sale|discount|offer|promo/i.test(t))return"price-focused";if(/gaming|game|esport/i.test(t))return"gaming";if(/work|office|professional|productivity/i.test(t))return"professional";if(/creative|design|art|studio/i.test(t))return"creative";if(/brand|story|about/i.test(t))return"brand-story"}if(e.utm.utm_source){t=e.utm.utm_source.toLowerCase();if(/google|bing|yahoo/i.test(t))return"search-optimized";if(/facebook|instagram|tiktok/i.test(t))return"social-visual";if(/twitter|x$/i.test(t))return"social-brief";if(/email|newsletter/i.test(t))return"returning-user";if(/youtube/i.test(t))return"video-engaged"}return"search"===e.referrer.category?"search-optimized":"social"===e.referrer.category?"social-visual":"email"===e.referrer.category?"returning-user":"default"}function v(t){if("string"!=typeof t||!t.trim())return"";try{var e=(new DOMParser).parseFromString(t,"text/html").body;return e?function e(t){var r="";for(var n=0;n<t.childNodes.length;n++){var i,s=t.childNodes[n];3===s.nodeType?r+=T(s.textContent):1===s.nodeType&&"script"!==(i=s.tagName.toLowerCase())&&"style"!==i&&"iframe"!==i&&"object"!==i&&"embed"!==i&&"form"!==i&&"input"!==i&&"textarea"!==i&&(a[i]?(r=(r+="<"+i)+w(s)+">","br"!==i&&"img"!==i&&(r=(r+=e(s))+"</"+i+">")):r+=e(s))}return r}(e):""}catch(e){return console.warn("[Lua Sanitizer] DOMParser failed, using fallback:",e),M(t)}}function w(e){for(var t="",r=e.attributes,n=0;n<r.length;n++){var i=r[n],s=i.name.toLowerCase(),i=i.value;f.test(s)||!c[s]||("href"===s||"src"===s)&&l.test(i.trim())||(t+="target"===s&&"_blank"===i?' target="_blank" rel="noopener noreferrer"':" "+s+'="'+k(i)+'"')}return t}function T(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}function k(e){return e?e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}function M(e){var t;return"string"!=typeof e?"":(t=e,[/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,/<object\b[^<]*(?:(?!<\/object>)<[^<]*)*<\/object>/gi,/<embed\b[^>]*>/gi,/<link\b[^>]*>/gi,/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,/<form\b[^<]*(?:(?!<\/form>)<[^<]*)*<\/form>/gi,/javascript:/gi,/vbscript:/gi,/data:/gi,/on\w+\s*=/gi].forEach(function(e){t=t.replace(e,"")}),t=t.replace(/<\/?(\w+)([^>]*)>/g,function(e,t,r){t=t.toLowerCase();if(!a[t])return"";if("/"===e.charAt(1))return"</"+t+">";for(var n="",i=/(\w+)=['"]([^'"]*)['"]/g;null!==(s=i.exec(r));){var s,o=s[1].toLowerCase();c[o]&&!f.test(o)&&(s=s[2],("href"===o||"src"===o)&&l.test(s)||(n+=" "+o+'="'+s+'"'))}return"<"+t+n+">"}))}function A(e,t){e&&(e.textContent=t)}function U(e,t){return(t=t||("undefined"!=typeof document?document:null))?t.querySelectorAll(e?'[data-personalize="'+e+'"]':"[data-personalize]"):[]}function L(e,t){var r;return t&&"object"==typeof t?t[e]||t.default||((r=Object.keys(t)[0])?(console.warn('[Lua Personalize] Intent "'+e+'" not found, using first available template:',r),t[r]):null):(console.warn("[Lua Personalize] No templates provided. Templates must be passed via options.templates"),null)}function x(e,t){if(e.length!==t.length)return e[0];for(var r=0,n=0;n<t.length;n++)r+=t[n];var i=Math.random()*r,s=0;for(n=0;n<e.length;n++)if(i<=(s+=t[n]))return e[n];return e[e.length-1]}function C(e){if(!e||"object"!=typeof e)return null;var t=Object.keys(e);if(0===t.length)return null;for(var r=[],n=0;n<t.length;n++)r.push(1);return x(t,r)}function E(e,t){var s=e.template,r=e.context||{},t=!1!==(t=t||{}).log;if(s){["image","headline","subheadline","ctaLabel","ctaLink"].forEach(function(e){for(var t=U(e),r=0;r<t.length;r++){var n=t[r],i=s[e];i&&("image"===e?"IMG"===n.tagName?(n.src=i,n.alt=s.headline||"Personalized image"):n.style.backgroundImage="url("+i+")":"ctaLink"===e?n.href=i:A(n,i))}});for(var n=U("hero"),i=0;i<n.length;i++){var o=n[i];o.setAttribute("data-intent",e.intent),o.setAttribute("data-source",e.source),s.image&&!o.querySelector('[data-personalize="image"]')&&(o.style.backgroundImage="url("+s.image+")")}t&&"undefined"!=typeof console&&console.log("[Lua Personalize] Applied:",{intent:e.intent,source:e.source,headline:s.headline,hasUTM:r.hasUTM,utmParams:r.utm||{},aiPowered:"ai"===e.source||"ai-cached"===e.source})}else console.warn("[Lua Personalize] No template in decision, skipping DOM update");return e}function I(e){return e&&e.context?e.context:u.LuaUTM&&"function"==typeof u.LuaUTM.getContext?u.LuaUTM.getContext():{utm:{},referrer:{source:"direct",category:"direct",url:""},userAgent:{raw:"",isMobile:!1,isTablet:!1,isDesktop:!0},timestamp:Date.now(),hasUTM:!1,primaryIntent:"default"}}function P(t){var r,e;return(t=t||{}).templates&&"object"==typeof t.templates&&0!==Object.keys(t.templates).length?(r=I(t),(e=d.decide(r,t))&&"function"==typeof e.then?e.then(function(e){return E(e,t)}).catch(function(e){return console.warn("[Lua Personalize] AI decision failed, using standard:",e.message),E(d.standardDecide(r,t),t)}):E(e,t)):(console.error("[Lua Personalize] Templates are required. Provide templates via options.templates"),{template:null,intent:"default",source:"error",context:{},error:"No templates provided"})}O="undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0,i=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],n={google:/google\./i,bing:/bing\./i,yahoo:/yahoo\./i,duckduckgo:/duckduckgo\./i,facebook:/facebook\.com|fb\.com/i,twitter:/twitter\.com|t\.co|x\.com/i,instagram:/instagram\.com/i,linkedin:/linkedin\.com/i,pinterest:/pinterest\./i,tiktok:/tiktok\.com/i,youtube:/youtube\.com|youtu\.be/i,reddit:/reddit\.com/i},s={search:["google","bing","yahoo","duckduckgo"],social:["facebook","twitter","instagram","linkedin","pinterest","tiktok","youtube","reddit"]},O.LuaUTM={extractUTMParams:t,sanitizeParam:g,detectReferrer:p,getUserAgentInfo:h,getContext:y,getContextAsync:function(n){var i=(n=n||{}).timeout||1e3;return new Promise(function(t){var r=setTimeout(function(){t({utm:{},referrer:{source:"direct",category:"direct",url:""},userAgent:{raw:"",isMobile:!1,isTablet:!1,isDesktop:!0},timestamp:Date.now(),hasUTM:!1,primaryIntent:"default",timedOut:!0})},i);try{var e=y(n);clearTimeout(r),e.timedOut=!1,t(e)}catch(e){clearTimeout(r),t({utm:{},referrer:{source:"direct",category:"direct",url:""},userAgent:{raw:"",isMobile:!1,isTablet:!1,isDesktop:!0},timestamp:Date.now(),hasUTM:!1,primaryIntent:"default",error:e.message})}})},inferIntent:b,UTM_PARAMS:i,UTM_TIMEOUT_MS:1e3,REFERRER_PATTERNS:n,REFERRER_CATEGORIES:s},u="undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0,a={p:!0,span:!0,strong:!0,em:!0,b:!0,i:!0,br:!0,a:!0,img:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,div:!0,section:!0,ul:!0,ol:!0,li:!0,blockquote:!0,figure:!0,figcaption:!0},c={href:!0,src:!0,alt:!0,class:!0,id:!0,title:!0,target:!0,rel:!0,width:!0,height:!0,loading:!0},l=/^(javascript|vbscript|data):/i,f=/^on/i,r={sanitize:function(e){return"string"==typeof e&&e.trim()?((()=>{try{return"undefined"!=typeof DOMParser&&new DOMParser}catch(e){}})()?v:M)(e):""},escapeText:T,escapeAttr:k},d={standardDecide:function(e,t){var r=(t=t||{}).rules||{},n=t.templates,t=!1!==t.randomFallback;if(!n||"object"!=typeof n||0===Object.keys(n).length)return console.warn("[Lua Personalize] No templates provided. Templates must be passed via options.templates"),{template:null,intent:"default",source:"error",context:e,error:"No templates provided"};var i,s=e.primaryIntent,o="default";for(i in e.hasUTM?o="utm":e.referrer&&"direct"!==e.referrer.category&&(o="referrer"),r){var a=r[i];if("function"==typeof a.match&&a.match(e)){s=a.intent||i,o="custom-rule";break}}return"default"===s&&"default"===o&&t&&(t=C(n))&&(s=t,o="random-ab"),u.LuaWeightedHistory&&"function"==typeof u.LuaWeightedHistory.recordVisit&&u.LuaWeightedHistory.recordVisit({context:e,intent:s,selectedVariant:s,source:o,aiDecision:!1}),{template:L(s,n),intent:s,source:o,context:e}},decide:function(t,r){if((r=r||{}).enableAI&&r.aiConfig&&u.LuaAIPersonalize){var n=this,e=u.LuaAIPersonalize,i=e.isReady(r.aiConfig);if(i.ready)return e.decide(t,r).catch(function(e){if(!1!==r.aiConfig.fallbackToStandard)return console.warn("[Lua Personalize] AI failed, using standard engine:",e.message),n.standardDecide(t,r);throw e});console.warn("[Lua Personalize] AI not ready:",i.error,"- using standard engine")}return this.standardDecide(t,r)}},u.LuaPersonalize={sanitizer:r,sanitizeHTML:function(e){return r.sanitize(e)},safeSetText:A,safeSetHTML:function(e,t){e&&(e.innerHTML=r.sanitize(t))},findElements:U,getTemplate:L,engine:d,personalize:P,personalizeAsync:function(t){if(t=t||{},u.LuaUTM&&"function"==typeof u.LuaUTM.getContextAsync)return u.LuaUTM.getContextAsync(t).then(function(e){return t.context=e,P(t)}).then(function(e){return e}).catch(function(e){console.warn("[Lua Personalize] Async error, using default:",e);e={templates:t.templates,context:I(t),log:t.log};return E(d.standardDecide(e.context,e),e)});try{var r=P(t);return r&&"function"==typeof r.then?r:Promise.resolve(r)}catch(e){console.warn("[Lua Personalize] Error, using default:",e);r={utm:{},referrer:{source:"direct",category:"direct",url:""},userAgent:{raw:"",isMobile:!1,isTablet:!1,isDesktop:!0},timestamp:Date.now(),hasUTM:!1,primaryIntent:"default"},r=d.standardDecide(r,{templates:t.templates});return Promise.resolve(E(r,t))}},autoInit:function(e){function t(){0<U().length&&P(e)}e=e||{},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t())},chooseWeightedRandom:x,getRandomFallbackIntent:C,applyDecisionToDOM:E,resolveContext:I};var z,O={browserCookie:{type:"browserCookie",get:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},set:function(e,t){var r=new Date("12/31/9999").toUTCString();document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; expires="+r+"; path=/"},isSupported:function(){return"undefined"!=typeof document}},local:{type:"local",get:function(e){return localStorage.getItem(e)},set:function(e,t){return localStorage.setItem(e,t)},isSupported:function(){if("undefined"!=typeof localStorage)return!0;var e=new Date;try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}},memory:(z=Object.create(null),{type:"memory",get:function(e){return z[e]},set:function(e,t){z[e]=t},isSupported:function(){return!0}})};return(window.Lua=e).stores=O,e.utm=window.LuaUTM||{},e.personalization=window.LuaPersonalize||{},e});
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@okeyamy/lua",
3
+ "version": "5.0.4",
4
+ "author": "Okey Amy <amaobiokeoma@gmail.com>",
5
+ "homepage": "https://github.com/OkeyAmy/Lua-Dynamic-Website-",
6
+ "description": "A client side A/B tester",
7
+ "license": "MIT",
8
+ "main": "build/lua.js",
9
+ "module": "build/lua.es.js",
10
+ "unpkg": "build/lua.min.js",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git://github.com/dollarshaveclub/lua.git"
14
+ },
15
+ "dependencies": {
16
+ "@babel/plugin-transform-runtime": "^7.2.0",
17
+ "@babel/runtime": "^7.2.0"
18
+ },
19
+ "devDependencies": {
20
+ "@babel/cli": "^7.2.3",
21
+ "@babel/core": "^7.2.2",
22
+ "@babel/preset-env": "^7.2.3",
23
+ "@babel/preset-stage-2": "^7.0.0",
24
+ "babel-core": "^7.0.0-bridge.0",
25
+ "babel-jest": "22.4.3",
26
+ "chai": "^4.2.0",
27
+ "conventional-changelog-cli": "2.0.11",
28
+ "eslint": "5.6.0",
29
+ "eslint-config-dollarshaveclub": "3.1.1",
30
+ "husky": "1.3.1",
31
+ "jest": "22.4.3",
32
+ "rollup": "^1.1.0",
33
+ "rollup-plugin-babel": "^4.1.0",
34
+ "rollup-plugin-replace": "^2.1.0",
35
+ "rollup-plugin-uglify": "^6.0.0"
36
+ },
37
+ "files": [
38
+ "build"
39
+ ],
40
+ "jest": {
41
+ "testURL": "http://localhost/",
42
+ "collectCoverage": true,
43
+ "transform": {
44
+ "^.+\\.js$": "<rootDir>/node_modules/babel-jest"
45
+ },
46
+ "transformIgnorePatterns": [
47
+ "[/\\\\]node_modules[/\\\\].+\\.(js)$"
48
+ ]
49
+ },
50
+ "scripts": {
51
+ "build": "rollup --config configs/rollup.config.js",
52
+ "build-es5": "NODE_ENV=production npx babel src -s inline -d build/es5",
53
+ "chore:delete-changelog-branch": "if git show-ref --quiet refs/heads/chore-changelog; then git branch -D chore-changelog; fi",
54
+ "chore:branch": "git checkout -b chore-changelog",
55
+ "chore:changelog": "conventional-changelog -p eslint -i CHANGELOG.md -s -r 0",
56
+ "chore:setup-next-work": "git checkout master && npm run chore:delete-changelog-branch",
57
+ "chore:pr": "git add . && git commit -m '[chore] updates changelog' --no-verify && git push origin chore-changelog -f",
58
+ "chore:setup-changelog": "git checkout master && git pull",
59
+ "chore": "npm run chore:delete-changelog-branch && npm run chore:branch && npm run chore:changelog && npm run chore:pr && npm run chore:setup-next-work",
60
+ "prepublish": "npm run build-es5",
61
+ "prepush": "npm run build && npm test",
62
+ "lint": "eslint . --fix",
63
+ "lint:ci": "eslint .",
64
+ "test": "jest",
65
+ "test:demo": "node test-demo.js",
66
+ "pages": "git push -f origin master:gh-pages"
67
+ }
68
+ }