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

factorial-i18n

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

factorial-i18n - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

6

__tests__/index.spec.js

@@ -81,6 +81,4 @@ import I18n from '../src'

describe('when it has a interpolation', () => {
it('throws if the variable is not found', () => {
expect(() => {
i18n.t('hello')
}).toThrowError()
it('does not thhrow if the variable is not found', () => {
expect(i18n.t('hello')).toBe('hola ')
})

@@ -87,0 +85,0 @@

# Changelog
## `0.1.0`
Relaxed a bit interpolations.
## `0.0.3`

@@ -4,0 +8,0 @@

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

{"/Users/pauramonrevilla/Sites/factorial-i18n/src/index.js": {"path":"/Users/pauramonrevilla/Sites/factorial-i18n/src/index.js","statementMap":{"0":{"start":{"line":10,"column":23},"end":{"line":10,"column":27}},"1":{"start":{"line":18,"column":4},"end":{"line":18,"column":36}},"2":{"start":{"line":19,"column":4},"end":{"line":19,"column":44}},"3":{"start":{"line":20,"column":4},"end":{"line":20,"column":22}},"4":{"start":{"line":24,"column":4},"end":{"line":24,"column":24}},"5":{"start":{"line":26,"column":4},"end":{"line":29,"column":5}},"6":{"start":{"line":27,"column":6},"end":{"line":27,"column":56}},"7":{"start":{"line":28,"column":6},"end":{"line":28,"column":28}},"8":{"start":{"line":36,"column":4},"end":{"line":36,"column":41}},"9":{"start":{"line":43,"column":19},"end":{"line":44,"column":54}},"10":{"start":{"line":46,"column":4},"end":{"line":53,"column":5}},"11":{"start":{"line":48,"column":6},"end":{"line":52,"column":8}},"12":{"start":{"line":49,"column":8},"end":{"line":49,"column":60}},"13":{"start":{"line":49,"column":54},"end":{"line":49,"column":60}},"14":{"start":{"line":51,"column":8},"end":{"line":51,"column":75}},"15":{"start":{"line":55,"column":4},"end":{"line":55,"column":17}},"16":{"start":{"line":68,"column":18},"end":{"line":68,"column":35}},"17":{"start":{"line":69,"column":4},"end":{"line":71,"column":5}},"18":{"start":{"line":70,"column":6},"end":{"line":70,"column":51}},"19":{"start":{"line":72,"column":18},"end":{"line":72,"column":33}},"20":{"start":{"line":74,"column":4},"end":{"line":81,"column":6}},"21":{"start":{"line":75,"column":6},"end":{"line":79,"column":7}},"22":{"start":{"line":76,"column":8},"end":{"line":78,"column":9}},"23":{"start":{"line":80,"column":6},"end":{"line":80,"column":42}},"24":{"start":{"line":93,"column":16},"end":{"line":93,"column":26}},"25":{"start":{"line":95,"column":4},"end":{"line":97,"column":5}},"26":{"start":{"line":96,"column":6},"end":{"line":96,"column":57}},"27":{"start":{"line":99,"column":17},"end":{"line":99,"column":41}},"28":{"start":{"line":100,"column":23},"end":{"line":100,"column":40}},"29":{"start":{"line":102,"column":4},"end":{"line":102,"column":35}},"30":{"start":{"line":114,"column":20},"end":{"line":114,"column":41}},"31":{"start":{"line":115,"column":4},"end":{"line":115,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":17,"column":2},"end":{"line":17,"column":3}},"loc":{"start":{"line":17,"column":70},"end":{"line":21,"column":3}},"line":17},"1":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":2},"end":{"line":23,"column":3}},"loc":{"start":{"line":23,"column":35},"end":{"line":30,"column":3}},"line":23},"2":{"name":"(anonymous_2)","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":3}},"loc":{"start":{"line":35,"column":56},"end":{"line":37,"column":3}},"line":35},"3":{"name":"(anonymous_3)","decl":{"start":{"line":42,"column":2},"end":{"line":42,"column":3}},"loc":{"start":{"line":42,"column":40},"end":{"line":56,"column":3}},"line":42},"4":{"name":"(anonymous_4)","decl":{"start":{"line":48,"column":36},"end":{"line":48,"column":37}},"loc":{"start":{"line":48,"column":46},"end":{"line":52,"column":7}},"line":48},"5":{"name":"(anonymous_5)","decl":{"start":{"line":67,"column":2},"end":{"line":67,"column":3}},"loc":{"start":{"line":67,"column":60},"end":{"line":82,"column":3}},"line":67},"6":{"name":"(anonymous_6)","decl":{"start":{"line":74,"column":32},"end":{"line":74,"column":33}},"loc":{"start":{"line":74,"column":50},"end":{"line":81,"column":5}},"line":74},"7":{"name":"(anonymous_7)","decl":{"start":{"line":92,"column":2},"end":{"line":92,"column":3}},"loc":{"start":{"line":92,"column":60},"end":{"line":103,"column":3}},"line":92},"8":{"name":"(anonymous_8)","decl":{"start":{"line":113,"column":2},"end":{"line":113,"column":3}},"loc":{"start":{"line":113,"column":79},"end":{"line":116,"column":3}},"line":113}},"branchMap":{"0":{"loc":{"start":{"line":26,"column":4},"end":{"line":29,"column":5}},"type":"if","locations":[{"start":{"line":26,"column":4},"end":{"line":29,"column":5}},{"start":{"line":26,"column":4},"end":{"line":29,"column":5}}],"line":26},"1":{"loc":{"start":{"line":43,"column":19},"end":{"line":44,"column":54}},"type":"binary-expr","locations":[{"start":{"line":43,"column":19},"end":{"line":43,"column":64}},{"start":{"line":44,"column":6},"end":{"line":44,"column":54}}],"line":43},"2":{"loc":{"start":{"line":46,"column":4},"end":{"line":53,"column":5}},"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":53,"column":5}},{"start":{"line":46,"column":4},"end":{"line":53,"column":5}}],"line":46},"3":{"loc":{"start":{"line":49,"column":8},"end":{"line":49,"column":60}},"type":"if","locations":[{"start":{"line":49,"column":8},"end":{"line":49,"column":60}},{"start":{"line":49,"column":8},"end":{"line":49,"column":60}}],"line":49},"4":{"loc":{"start":{"line":69,"column":4},"end":{"line":71,"column":5}},"type":"if","locations":[{"start":{"line":69,"column":4},"end":{"line":71,"column":5}},{"start":{"line":69,"column":4},"end":{"line":71,"column":5}}],"line":69},"5":{"loc":{"start":{"line":75,"column":6},"end":{"line":79,"column":7}},"type":"if","locations":[{"start":{"line":75,"column":6},"end":{"line":79,"column":7}},{"start":{"line":75,"column":6},"end":{"line":79,"column":7}}],"line":75},"6":{"loc":{"start":{"line":95,"column":4},"end":{"line":97,"column":5}},"type":"if","locations":[{"start":{"line":95,"column":4},"end":{"line":97,"column":5}},{"start":{"line":95,"column":4},"end":{"line":97,"column":5}}],"line":95}},"s":{"0":1,"1":12,"2":12,"3":12,"4":10,"5":10,"6":5,"7":5,"8":2,"9":14,"10":14,"11":14,"12":28,"13":26,"14":2,"15":14,"16":14,"17":14,"18":2,"19":12,"20":12,"21":8,"22":1,"23":7,"24":8,"25":7,"26":1,"27":6,"28":6,"29":6,"30":2,"31":2},"f":{"0":12,"1":10,"2":2,"3":14,"4":28,"5":14,"6":8,"7":8,"8":2},"b":{"0":[5,5],"1":[14,1],"2":[14,0],"3":[26,2],"4":[2,12],"5":[1,7],"6":[1,6]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"848b3337ec3d81d1a8f19104c84167dfde9da373"}
{"/Users/pauramonrevilla/Sites/factorial-i18n/src/index.js": {"path":"/Users/pauramonrevilla/Sites/factorial-i18n/src/index.js","statementMap":{"0":{"start":{"line":14,"column":4},"end":{"line":14,"column":26}},"1":{"start":{"line":18,"column":4},"end":{"line":18,"column":36}},"2":{"start":{"line":22,"column":4},"end":{"line":22,"column":24}},"3":{"start":{"line":24,"column":4},"end":{"line":27,"column":5}},"4":{"start":{"line":25,"column":6},"end":{"line":25,"column":56}},"5":{"start":{"line":26,"column":6},"end":{"line":26,"column":28}},"6":{"start":{"line":34,"column":4},"end":{"line":34,"column":41}},"7":{"start":{"line":41,"column":4},"end":{"line":41,"column":56}},"8":{"start":{"line":54,"column":18},"end":{"line":54,"column":35}},"9":{"start":{"line":55,"column":4},"end":{"line":57,"column":5}},"10":{"start":{"line":56,"column":6},"end":{"line":56,"column":51}},"11":{"start":{"line":58,"column":18},"end":{"line":58,"column":33}},"12":{"start":{"line":60,"column":4},"end":{"line":63,"column":6}},"13":{"start":{"line":61,"column":6},"end":{"line":61,"column":26}},"14":{"start":{"line":61,"column":17},"end":{"line":61,"column":26}},"15":{"start":{"line":62,"column":6},"end":{"line":62,"column":32}},"16":{"start":{"line":75,"column":16},"end":{"line":75,"column":26}},"17":{"start":{"line":77,"column":4},"end":{"line":79,"column":5}},"18":{"start":{"line":78,"column":6},"end":{"line":78,"column":57}},"19":{"start":{"line":81,"column":17},"end":{"line":81,"column":41}},"20":{"start":{"line":82,"column":23},"end":{"line":82,"column":40}},"21":{"start":{"line":84,"column":4},"end":{"line":84,"column":35}},"22":{"start":{"line":96,"column":20},"end":{"line":96,"column":41}},"23":{"start":{"line":97,"column":4},"end":{"line":97,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":13,"column":2},"end":{"line":13,"column":3}},"loc":{"start":{"line":13,"column":17},"end":{"line":15,"column":3}},"line":13},"1":{"name":"(anonymous_1)","decl":{"start":{"line":17,"column":2},"end":{"line":17,"column":3}},"loc":{"start":{"line":17,"column":53},"end":{"line":19,"column":3}},"line":17},"2":{"name":"(anonymous_2)","decl":{"start":{"line":21,"column":2},"end":{"line":21,"column":3}},"loc":{"start":{"line":21,"column":35},"end":{"line":28,"column":3}},"line":21},"3":{"name":"(anonymous_3)","decl":{"start":{"line":33,"column":2},"end":{"line":33,"column":3}},"loc":{"start":{"line":33,"column":56},"end":{"line":35,"column":3}},"line":33},"4":{"name":"(anonymous_4)","decl":{"start":{"line":40,"column":2},"end":{"line":40,"column":3}},"loc":{"start":{"line":40,"column":40},"end":{"line":42,"column":3}},"line":40},"5":{"name":"(anonymous_5)","decl":{"start":{"line":53,"column":2},"end":{"line":53,"column":3}},"loc":{"start":{"line":53,"column":60},"end":{"line":64,"column":3}},"line":53},"6":{"name":"(anonymous_6)","decl":{"start":{"line":60,"column":32},"end":{"line":60,"column":33}},"loc":{"start":{"line":60,"column":50},"end":{"line":63,"column":5}},"line":60},"7":{"name":"(anonymous_7)","decl":{"start":{"line":74,"column":2},"end":{"line":74,"column":3}},"loc":{"start":{"line":74,"column":60},"end":{"line":85,"column":3}},"line":74},"8":{"name":"(anonymous_8)","decl":{"start":{"line":95,"column":2},"end":{"line":95,"column":3}},"loc":{"start":{"line":95,"column":79},"end":{"line":98,"column":3}},"line":95}},"branchMap":{"0":{"loc":{"start":{"line":24,"column":4},"end":{"line":27,"column":5}},"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":27,"column":5}},{"start":{"line":24,"column":4},"end":{"line":27,"column":5}}],"line":24},"1":{"loc":{"start":{"line":55,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":55,"column":4},"end":{"line":57,"column":5}},{"start":{"line":55,"column":4},"end":{"line":57,"column":5}}],"line":55},"2":{"loc":{"start":{"line":61,"column":6},"end":{"line":61,"column":26}},"type":"if","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":26}},{"start":{"line":61,"column":6},"end":{"line":61,"column":26}}],"line":61},"3":{"loc":{"start":{"line":77,"column":4},"end":{"line":79,"column":5}},"type":"if","locations":[{"start":{"line":77,"column":4},"end":{"line":79,"column":5}},{"start":{"line":77,"column":4},"end":{"line":79,"column":5}}],"line":77}},"s":{"0":11,"1":11,"2":10,"3":10,"4":5,"5":5,"6":2,"7":13,"8":13,"9":13,"10":2,"11":11,"12":11,"13":8,"14":1,"15":7,"16":8,"17":7,"18":1,"19":6,"20":6,"21":6,"22":2,"23":2},"f":{"0":11,"1":11,"2":10,"3":2,"4":13,"5":13,"6":8,"7":8,"8":2},"b":{"0":[5,5],"1":[2,11],"2":[1,7],"3":[1,6]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"3831421fd502c546ffc2d6d0656424bb0c703106"}
,"/Users/pauramonrevilla/Sites/factorial-i18n/src/numeralLanguages.js": {"path":"/Users/pauramonrevilla/Sites/factorial-i18n/src/numeralLanguages.js","statementMap":{"0":{"start":{"line":20,"column":16},"end":{"line":20,"column":27}},"1":{"start":{"line":22,"column":6},"end":{"line":26,"column":78}}},"fnMap":{},"branchMap":{"0":{"loc":{"start":{"line":22,"column":13},"end":{"line":26,"column":78}},"type":"cond-expr","locations":[{"start":{"line":23,"column":10},"end":{"line":23,"column":14}},{"start":{"line":24,"column":10},"end":{"line":26,"column":78}}],"line":22},"1":{"loc":{"start":{"line":22,"column":13},"end":{"line":22,"column":31}},"type":"binary-expr","locations":[{"start":{"line":22,"column":13},"end":{"line":22,"column":20}},{"start":{"line":22,"column":24},"end":{"line":22,"column":31}}],"line":22},"2":{"loc":{"start":{"line":24,"column":10},"end":{"line":26,"column":78}},"type":"cond-expr","locations":[{"start":{"line":25,"column":12},"end":{"line":25,"column":16}},{"start":{"line":26,"column":12},"end":{"line":26,"column":78}}],"line":24},"3":{"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":78}},"type":"cond-expr","locations":[{"start":{"line":26,"column":33},"end":{"line":26,"column":37}},{"start":{"line":26,"column":40},"end":{"line":26,"column":78}}],"line":26},"4":{"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":30}},"type":"binary-expr","locations":[{"start":{"line":26,"column":12},"end":{"line":26,"column":19}},{"start":{"line":26,"column":23},"end":{"line":26,"column":30}}],"line":26},"5":{"loc":{"start":{"line":26,"column":40},"end":{"line":26,"column":78}},"type":"cond-expr","locations":[{"start":{"line":26,"column":50},"end":{"line":26,"column":54}},{"start":{"line":26,"column":57},"end":{"line":26,"column":78}}],"line":26},"6":{"loc":{"start":{"line":26,"column":57},"end":{"line":26,"column":78}},"type":"cond-expr","locations":[{"start":{"line":26,"column":67},"end":{"line":26,"column":71}},{"start":{"line":26,"column":74},"end":{"line":26,"column":78}}],"line":26}},"s":{"0":0,"1":0},"f":{},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"1b5cf8a42b8d3e0caebf7ef68366cdb0bc76a155"}
}

@@ -92,5 +92,3 @@ 'use strict';

return value.replace(MATCH, function (match, subst) {
if (!opts) {
throw new Error('Translation "' + path + '" has a missing interpolation value "' + subst + '"');
}
if (!opts) return '';
return String(opts[subst]);

@@ -97,0 +95,0 @@ });

{
"name": "factorial-i18n",
"version": "0.0.4",
"version": "0.1.0",
"description": "Factorial i18n library",

@@ -5,0 +5,0 @@ "repository": {

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

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

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