From 1389707de772d6f9f5489d8e71af8dbd3fd082fd Mon Sep 17 00:00:00 2001 From: = Date: Thu, 28 Feb 2019 12:04:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20=20=20Introduce=20version=200.0.?= =?UTF-8?q?7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- benchmark/result.html | 2 +- dist/cjs/frenchkiss.js | 4 ++-- dist/esm/frenchkiss.js | 4 ++-- dist/umd/frenchkiss.js | 4 ++-- package.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4455a7e..a9af5d3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

💋 FrenchKiss.js

[![Build Status](https://travis-ci.com/koala-interactive/frenchkiss.js.svg?branch=master)](https://travis-ci.com/koala-interactive/frenchkiss.js) -[![File size](https://img.shields.io/badge/GZIP%20size-1021%20B-brightgreen.svg)](./dist/umd/frenchkiss.js) +[![File size](https://img.shields.io/badge/GZIP%20size-1028%20B-brightgreen.svg)](./dist/umd/frenchkiss.js) ![](https://img.shields.io/badge/dependencies-none-brightgreen.svg) ![](https://img.shields.io/snyk/vulnerabilities/github/koala-interactive/frenchkiss.js.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) diff --git a/benchmark/result.html b/benchmark/result.html index 61b540a..3a300ad 100644 --- a/benchmark/result.html +++ b/benchmark/result.html @@ -16,7 +16,7 @@ }); google.charts.setOnLoadCallback(function() { - var data = google.visualization.arrayToDataTable([["JS Libraries","Raw String","Interpolate","Plural","Plural Interpolate"],["Vue I18n",704136.0450514017,538358.2524051574,460543.72700921475,373103.74591401394],["Polyglot.js",28684.14534293864,26754.10599875364,17257.52059017387,19201.90866508734],["i18next",63230.53929948756,37607.040302158246,79169.0265925132,33364.49533779879],["I18n.js",702288.85510918,98663.16110113409,248619.8571566103,109207.24916185612],["Google Closure",2688684.7862019623,246434.98927294646,235549.00969294435,160034.06667547204],["FrenchKiss.js",20207463.52331674,7102082.21048006,9912822.995864006,7098418.902463041]]); + var data = google.visualization.arrayToDataTable([["JS Libraries","Raw String","Interpolate","Plural","Plural Interpolate"],["Vue I18n",633465.3095226205,490751.674640999,572898.7072931823,432485.7407307202],["Polyglot.js",29182.762947133513,24878.02429291416,27809.533020522416,25380.31380766069],["i18next",74321.39049781616,37649.43738913464,127006.05444874118,36381.098756569176],["I18n.js",704126.2695885809,103471.83396635597,364390.557885891,111242.893023925],["Google Closure",2535803.442376795,330087.8306326557,262287.66588887724,174010.911750061],["FrenchKiss.js",20412579.72343485,7540249.012560963,9819267.856271362,7323430.074355557]]); new google.charts.Bar(document.body).draw(data, { chart: { diff --git a/dist/cjs/frenchkiss.js b/dist/cjs/frenchkiss.js index 52fa0ef..75d3fa8 100644 --- a/dist/cjs/frenchkiss.js +++ b/dist/cjs/frenchkiss.js @@ -1,6 +1,6 @@ /** - * @license frenchkiss 0.0.6 + * @license frenchkiss 0.0.7 * Copyright (c) 2018-2019 Koala Interactive, Inc. * License: MIT */ -"use strict";var t=/^\s*\w+\s*$/,r=/^\s*(\w+)\s*,\s*(select|plural)\s*,/i,n=JSON.stringify,e=function(t){return'(p["'+t.trim()+'"]||"")'};function u(t){for(var r={},u=function t(r,u){var o=[];var f=r.length;for(var i=0;i'(p["'+t.trim()+'"]||"")';function l(t){const e={},l=function t(e,l){const o=[];const r=e.length;for(let c=0;ct;const h=(t,e)=>(c[e]||(c[e]={}),!c[e][t]&&f[e]&&"string"==typeof f[e][t]&&(c[e][t]=l(f[e][t])),c[e][t]),g=(t,e,n)=>{let s,l=n||i;return l&&(s=h(t,l)),!s&&p&&(s=h(t,l=p)),s?s(e,u[l]):a(t)},d=t=>{a=t},m=t=>(t&&(i=t),i),y=t=>(t&&(p=t),p),b=(t,e)=>{c[t]={},f[t]=e},j=(t,e)=>{u[t]=e},k=(t,e)=>{f[t]||(f[t]={}),c[t]||(c[t]={});const n=Object.keys(e),s=n.length;for(let l=0;l{delete c[t],delete f[t]};export default{cache:c,store:f,t:g,onMissingKey:d,locale:m,fallback:y,set:b,unset:w,extend:k,plural:j};export{c as cache,f as store,g as t,d as onMissingKey,m as locale,y as fallback,b as set,j as plural,k as extend,w as unset}; +const t=/^\s*\w+\s*$/,e=/^\s*(\w+)\s*,\s*(select|plural)\s*,/i,n=JSON.stringify,s=t=>'(p["'+t+'"]||(p["'+t+'"]=="0"?0:""))';function l(t){const e={},l=function t(e,l){const o=[];const r=e.length;for(let c=0;ct;const h=(t,e)=>(c[e]||(c[e]={}),!c[e][t]&&f[e]&&"string"==typeof f[e][t]&&(c[e][t]=l(f[e][t])),c[e][t]),g=(t,e,n)=>{let s,l=n||i;return l&&(s=h(t,l)),!s&&p&&(s=h(t,l=p)),s?s(e,u[l]):a(t)},d=t=>{a=t},m=t=>(t&&(i=t),i),y=t=>(t&&(p=t),p),b=(t,e)=>{c[t]={},f[t]=e},j=(t,e)=>{u[t]=e},k=(t,e)=>{f[t]||(f[t]={}),c[t]||(c[t]={});const n=Object.keys(e),s=n.length;for(let l=0;l{delete c[t],delete f[t]};export default{cache:c,store:f,t:g,onMissingKey:d,locale:m,fallback:y,set:b,unset:w,extend:k,plural:j};export{c as cache,f as store,g as t,d as onMissingKey,m as locale,y as fallback,b as set,j as plural,k as extend,w as unset}; diff --git a/dist/umd/frenchkiss.js b/dist/umd/frenchkiss.js index 461082f..263e901 100644 --- a/dist/umd/frenchkiss.js +++ b/dist/umd/frenchkiss.js @@ -1,6 +1,6 @@ /** - * @license frenchkiss 0.0.6 + * @license frenchkiss 0.0.7 * Copyright (c) 2018-2019 Koala Interactive, Inc. * License: MIT */ -var e,t;e=this,t=function(){"use strict";var e=/^\s*\w+\s*$/,t=/^\s*(\w+)\s*,\s*(select|plural)\s*,/i,n=JSON.stringify,r=function(e){return'(p["'+e.trim()+'"]||"")'};function u(e){for(var t={},u=function e(t,u){var f=[];var o=t.length;for(var i=0;i", "license": "MIT",