Socket
Socket
Sign inDemoInstall

difference-engine

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

2

babel.config.js

@@ -5,6 +5,6 @@ const presets = [

{
useBuiltIns: 'usage',
targets: {
node: 'current'
},
useBuiltIns: 'usage',
corejs: 3

@@ -11,0 +11,0 @@ }

@@ -9,3 +9,3 @@ import {

writeFile
} from 'sacred-fs'
} from 'fs/promises'

@@ -18,5 +18,12 @@ const curl = (url) => (

const lint = () => (
new Promise((resolve, reject) => {
exec('npx eslint . --fix', (e) => (!e) ? resolve() : reject(e))
})
)
const URL = 'https://dev.w3.org/html5/html-author/charref'
const NOW = moment().format('MMMM Do YYYY, h:mm:ss')
const X = /<td class="named"><code>(?:(?:&amp;(\w+);\s?)*)<\/code>.*<td class="dec"><code>&amp;#(\d+);<\/code>.*<td class="desc">(.+)/
const JOIN = String.fromCodePoint(44).concat(String.fromCodePoint(10))

@@ -31,2 +38,10 @@ function getEntityNameFromCharFor (decimal, value, label) {

function mapEntityNameFromCharFor ({ decimal, value, label }) {
return getEntityNameFromCharFor(decimal, value, label)
}
function mapCharFromEntityNameFor ({ value, decimal, label }) {
return getCharFromEntityNameFor(value, decimal, label)
}
function transformToEntityNameFromChar (a = []) {

@@ -40,3 +55,3 @@ return (`/*

export default {
${a.map(({ decimal, value, label }) => getEntityNameFromCharFor(decimal, value, label)).join(String.fromCodePoint(44).concat(String.fromCodePoint(10)))}
${a.map(mapEntityNameFromCharFor).join(JOIN)}
}

@@ -54,3 +69,3 @@ `)

export default {
${a.map(({ value, decimal, label }) => getCharFromEntityNameFor(value, decimal, label)).join(String.fromCodePoint(44).concat(String.fromCodePoint(10)))}
${a.map(mapCharFromEntityNameFor).join(JOIN)}
}

@@ -78,4 +93,5 @@ `)

await writeFile('./src/common/string/char-from-entity-name.js', transformToCharFromEntityName(a))
await lint()
}
}
}

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.bite=bite;exports.indexOf=indexOf;exports.iterateForward=iterateForward;exports.iterateReverse=iterateReverse;exports.iterateBetween=iterateBetween;exports.max=max;exports.min=min;exports.default=void 0;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function bite(a=[],x=0,y=0){if((0,_common.isNumber)(x)){const l=0;const u=a.length-1;const m=-1;let z=0;if((0,_common.isNumber)(y)){if(Math.pow(x,m)===Number.NEGATIVE_INFINITY&&Math.pow(y,m)===Number.NEGATIVE_INFINITY){return a.slice(l).slice().reverse();}else{x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;y=u<(z=l>(z=y>m?y:y+u)?l:z)?u:z;return x>y?a.slice(y,x+1).slice().reverse():a.slice(x,y+1);}}if(Math.pow(x,m)===Number.NEGATIVE_INFINITY){return a.slice(u);}else{x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;return a.slice(x);}}return[];}function indexOf(a=[],v=undefined,i=0,j=a.length){for(i,j;i<j;i=i+1){if(a[i]===v){return i;}}return null;}function iterateForward(a=[],f=()=>{}){const j=a.length;if(j){let x=0;const y=j-1;do{f.call(a,a[x],x,y,a);}while((x=x+1)<j);return true;}return false;}function iterateReverse(a=[],f=()=>{}){const j=a.length;if(j){let x=j-1;const y=x;do{f.call(a,a[x],x,y,a);}while((x=x-1)>=0);return true;}return false;}function iterateBetween(a=[],x=0,y=0,f=()=>{}){if((0,_common.isNumber)(x)&&(0,_common.isNumber)(y)){const l=+0;const u=a.length;const m=-1;let z=0;x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;y=u<(z=l>(z=y>m?y:y+u)?l:z)?u:z;if(x>y){const n=y-1;do{f.call(a,a[x],x,y,a);}while(n<--x);}else{const n=y+1;do{f.call(a,a[x],x,y,a);}while(++x<n);}return true;}return false;}function max(a=[],j=a.length){let[x=null]=a;let z=1;while(z<j){const y=a[z];if(y>x)x=y;z=z+1;}return x;}function min(a=[],j=a.length){let[x=null]=a;let z=1;while(z<j){const y=a[z];if(y<x)x=y;z=z+1;}return x;}class ArrayEngine{static indexOf(a=[],v=undefined,i=0){const j=a.length;if(j){return indexOf(a,v,i,j);}return null;}static max(a=[]){const j=a.length;if(j){const z=Math.max(...a);return isNaN(z)?max(a,j):z;}return null;}static min(a=[]){const j=a.length;if(j){const z=Math.min(...a);return isNaN(z)?min(a,j):z;}return null;}}exports.default=ArrayEngine;_defineProperty(ArrayEngine,"bite",bite);_defineProperty(ArrayEngine,"iterateForward",iterateForward);_defineProperty(ArrayEngine,"iterateReverse",iterateReverse);_defineProperty(ArrayEngine,"iterateBetween",iterateBetween);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.bite=bite;exports.default=void 0;exports.indexOf=indexOf;exports.iterateBetween=iterateBetween;exports.iterateForward=iterateForward;exports.iterateReverse=iterateReverse;exports.max=max;exports.min=min;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function bite(a=[],x=0,y=0){if((0,_common.isNumber)(x)){const l=0;const u=a.length-1;const m=-1;let z=0;if((0,_common.isNumber)(y)){if(Math.pow(x,m)===Number.NEGATIVE_INFINITY&&Math.pow(y,m)===Number.NEGATIVE_INFINITY){return a.slice(l).slice().reverse();}else{x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;y=u<(z=l>(z=y>m?y:y+u)?l:z)?u:z;return x>y?a.slice(y,x+1).slice().reverse():a.slice(x,y+1);}}if(Math.pow(x,m)===Number.NEGATIVE_INFINITY){return a.slice(u);}else{x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;return a.slice(x);}}return[];}function indexOf(a=[],v=undefined,i=0,j=a.length){for(i,j;i<j;i=i+1){if(a[i]===v){return i;}}return null;}function iterateForward(a=[],f=()=>{}){const j=a.length;if(j){let x=0;const y=j-1;do{f.call(a,a[x],x,y,a);}while((x=x+1)<j);return true;}return false;}function iterateReverse(a=[],f=()=>{}){const j=a.length;if(j){let x=j-1;const y=x;do{f.call(a,a[x],x,y,a);}while((x=x-1)>=0);return true;}return false;}function iterateBetween(a=[],x=0,y=0,f=()=>{}){if((0,_common.isNumber)(x)&&(0,_common.isNumber)(y)){const l=+0;const u=a.length;const m=-1;let z=0;x=l>(z=u<(z=x>m?x:x+u)?u:z)?l:z;y=u<(z=l>(z=y>m?y:y+u)?l:z)?u:z;if(x>y){const n=y-1;do{f.call(a,a[x],x,y,a);}while(n<--x);}else{const n=y+1;do{f.call(a,a[x],x,y,a);}while(++x<n);}return true;}return false;}function max(a=[],j=a.length){let[x=null]=a;let z=1;while(z<j){const y=a[z];if(y>x)x=y;z=z+1;}return x;}function min(a=[],j=a.length){let[x=null]=a;let z=1;while(z<j){const y=a[z];if(y<x)x=y;z=z+1;}return x;}class ArrayEngine{static indexOf(a=[],v=undefined,i=0){const j=a.length;if(j){return indexOf(a,v,i,j);}return null;}static max(a=[]){const j=a.length;if(j){const z=Math.max(...a);return isNaN(z)?max(a,j):z;}return null;}static min(a=[]){const j=a.length;if(j){const z=Math.min(...a);return isNaN(z)?min(a,j):z;}return null;}}exports.default=ArrayEngine;_defineProperty(ArrayEngine,"bite",bite);_defineProperty(ArrayEngine,"iterateForward",iterateForward);_defineProperty(ArrayEngine,"iterateReverse",iterateReverse);_defineProperty(ArrayEngine,"iterateBetween",iterateBetween);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isNumber=exports.isString=exports.isFunction=exports.isObject=exports.isArray=void 0;const isArray=v=>(v||false).constructor===Array;exports.isArray=isArray;const isObject=v=>(v||false).constructor===Object&&!isArray(v);exports.isObject=isObject;const isFunction=v=>(v||false).constructor===Function;exports.isFunction=isFunction;const isString=v=>typeof v==='string';exports.isString=isString;const isNumber=v=>typeof v==='number';exports.isNumber=isNumber;
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isString=exports.isObject=exports.isNumber=exports.isFunction=exports.isArray=void 0;const isArray=v=>(v||false).constructor===Array;exports.isArray=isArray;const isObject=v=>(v||false).constructor===Object&&!isArray(v);exports.isObject=isObject;const isFunction=v=>(v||false).constructor===Function;exports.isFunction=isFunction;const isString=v=>typeof v==='string';exports.isString=isString;const isNumber=v=>typeof v==='number';exports.isNumber=isNumber;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getFromCodePoint=getFromCodePoint;exports.getCharFromEntityCode=getCharFromEntityCode;exports.getCharFromEntityName=getCharFromEntityName;exports.getEntityCodeFromChar=getEntityCodeFromChar;exports.getEntityNameFromChar=getEntityNameFromChar;Object.defineProperty(exports,"CHAR_FROM_ENTITY_NAME",{enumerable:true,get:function(){return _charFromEntityName.default;}});Object.defineProperty(exports,"ENTITY_NAME_FROM_CHAR",{enumerable:true,get:function(){return _entityNameFromChar.default;}});exports.entityNameFromCharMap=exports.entityCodeFromCharMap=exports.charFromEntityNameMap=exports.charFromEntityCodeMap=exports.fromCodePointMap=void 0;var _charFromEntityName=_interopRequireDefault(require("./char-from-entity-name"));var _entityNameFromChar=_interopRequireDefault(require("./entity-name-from-char"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const fromCodePointMap=new Map();exports.fromCodePointMap=fromCodePointMap;const charFromEntityCodeMap=new Map();exports.charFromEntityCodeMap=charFromEntityCodeMap;const charFromEntityNameMap=new Map(Object.entries(_charFromEntityName.default));exports.charFromEntityNameMap=charFromEntityNameMap;const entityCodeFromCharMap=new Map();exports.entityCodeFromCharMap=entityCodeFromCharMap;const entityNameFromCharMap=new Map(Object.entries(_entityNameFromChar.default));exports.entityNameFromCharMap=entityNameFromCharMap;function getFromCodePoint(index){if(fromCodePointMap.has(index))return fromCodePointMap.get(index);const char=String.fromCodePoint(index);fromCodePointMap.set(index,char);return char;}function getCharFromEntityCode(entityCode){if(charFromEntityCodeMap.has(entityCode))return charFromEntityCodeMap.get(entityCode);const a=entityCode.match(/#(\d+);/);if(a){const[m,v]=a;const n=m&&Number(v);if(!isNaN(n)){const char=String.fromCodePoint(n);charFromEntityCodeMap.set(entityCode,char);return char;}}return null;}function getCharFromEntityName(entityName){if(charFromEntityNameMap.has(entityName))return charFromEntityNameMap.get(entityName);return null;}function getEntityCodeFromChar(char){if(entityCodeFromCharMap.has(char))return entityCodeFromCharMap.get(char);const n=char.codePointAt(0);if(n!==undefined){const entityCode=`&#${n};`;entityCodeFromCharMap.set(char,entityCode);return entityCode;}return null;}function getEntityNameFromChar(char){if(entityNameFromCharMap.has(char))return entityNameFromCharMap.get(char);return null;}
"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"CHAR_FROM_ENTITY_NAME",{enumerable:true,get:function(){return _charFromEntityName.default;}});Object.defineProperty(exports,"ENTITY_NAME_FROM_CHAR",{enumerable:true,get:function(){return _entityNameFromChar.default;}});exports.fromCodePointMap=exports.entityNameFromCharMap=exports.entityCodeFromCharMap=exports.charFromEntityNameMap=exports.charFromEntityCodeMap=void 0;exports.getCharFromEntityCode=getCharFromEntityCode;exports.getCharFromEntityName=getCharFromEntityName;exports.getEntityCodeFromChar=getEntityCodeFromChar;exports.getEntityNameFromChar=getEntityNameFromChar;exports.getFromCodePoint=getFromCodePoint;var _charFromEntityName=_interopRequireDefault(require("./char-from-entity-name"));var _entityNameFromChar=_interopRequireDefault(require("./entity-name-from-char"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const fromCodePointMap=new Map();exports.fromCodePointMap=fromCodePointMap;const charFromEntityCodeMap=new Map();exports.charFromEntityCodeMap=charFromEntityCodeMap;const charFromEntityNameMap=new Map(Object.entries(_charFromEntityName.default));exports.charFromEntityNameMap=charFromEntityNameMap;const entityCodeFromCharMap=new Map();exports.entityCodeFromCharMap=entityCodeFromCharMap;const entityNameFromCharMap=new Map(Object.entries(_entityNameFromChar.default));exports.entityNameFromCharMap=entityNameFromCharMap;function getFromCodePoint(index){if(fromCodePointMap.has(index))return fromCodePointMap.get(index);const char=String.fromCodePoint(index);fromCodePointMap.set(index,char);return char;}function getCharFromEntityCode(entityCode){if(charFromEntityCodeMap.has(entityCode))return charFromEntityCodeMap.get(entityCode);const a=entityCode.match(/#(\d+);/);if(a){const[m,v]=a;const n=m&&Number(v);if(!isNaN(n)){const char=String.fromCodePoint(n);charFromEntityCodeMap.set(entityCode,char);return char;}}return null;}function getCharFromEntityName(entityName){if(charFromEntityNameMap.has(entityName))return charFromEntityNameMap.get(entityName);return null;}function getEntityCodeFromChar(char){if(entityCodeFromCharMap.has(char))return entityCodeFromCharMap.get(char);const n=char.codePointAt(0);if(n!==undefined){const entityCode=`&#${n};`;entityCodeFromCharMap.set(char,entityCode);return entityCode;}return null;}function getEntityNameFromChar(char){if(entityNameFromCharMap.has(char))return entityNameFromCharMap.get(char);return null;}

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.inclusive=inclusive;exports.exclusive=exclusive;exports.default=void 0;function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function has(array,value){let i=0;const j=array.length;for(i,j;i<j;i=i+1){if(array[i]===value){return true;}}return null;}function getInclusiveItems(alpha,omega){let i=0;const j=alpha.length;let value;const items=[];for(i,j;i<j;i=i+1){if(has(omega,value=alpha[i])===true){items.push(value);}}return items;}function getExclusiveItems(alpha,omega){let i=0;const j=alpha.length;let value;const items=[];for(i,j;i<j;i=i+1){if(has(omega,value=alpha[i])===null){items.push(value);}}return items;}function inclusive(alpha,omega){if(Array.isArray(alpha)&&Array.isArray(omega)){return getInclusiveItems(alpha,omega);}return[];}function exclusive(alpha,omega){if(Array.isArray(alpha)&&Array.isArray(omega)){return getExclusiveItems(alpha,omega);}return[];}class DifferenceEngine{}exports.default=DifferenceEngine;_defineProperty(DifferenceEngine,"inclusive",inclusive);_defineProperty(DifferenceEngine,"exclusive",exclusive);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.exclusive=exclusive;exports.inclusive=inclusive;function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function has(array,value){let i=0;const j=array.length;for(i,j;i<j;i=i+1){if(array[i]===value){return true;}}return null;}function getInclusiveItems(alpha,omega){let i=0;const j=alpha.length;let value;const items=[];for(i,j;i<j;i=i+1){if(has(omega,value=alpha[i])===true){items.push(value);}}return items;}function getExclusiveItems(alpha,omega){let i=0;const j=alpha.length;let value;const items=[];for(i,j;i<j;i=i+1){if(has(omega,value=alpha[i])===null){items.push(value);}}return items;}function inclusive(alpha,omega){if(Array.isArray(alpha)&&Array.isArray(omega)){return getInclusiveItems(alpha,omega);}return[];}function exclusive(alpha,omega){if(Array.isArray(alpha)&&Array.isArray(omega)){return getExclusiveItems(alpha,omega);}return[];}class DifferenceEngine{}exports.default=DifferenceEngine;_defineProperty(DifferenceEngine,"inclusive",inclusive);_defineProperty(DifferenceEngine,"exclusive",exclusive);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.fromKmToMt=fromKmToMt;exports.fromKmToCm=fromKmToCm;exports.fromKmToMm=fromKmToMm;exports.fromKmToIn=fromKmToIn;exports.fromKmToFt=fromKmToFt;exports.fromKmToYd=fromKmToYd;exports.fromKmToMi=fromKmToMi;exports.fromMtToKm=fromMtToKm;exports.fromMtToCm=fromMtToCm;exports.fromMtToMm=fromMtToMm;exports.fromMtToIn=fromMtToIn;exports.fromMtToFt=fromMtToFt;exports.fromMtToYd=fromMtToYd;exports.fromMtToMi=fromMtToMi;exports.fromCmToKm=fromCmToKm;exports.fromCmToMt=fromCmToMt;exports.fromCmToMm=fromCmToMm;exports.fromCmToIn=fromCmToIn;exports.fromCmToFt=fromCmToFt;exports.fromCmToYd=fromCmToYd;exports.fromCmToMi=fromCmToMi;exports.fromMmToKm=fromMmToKm;exports.fromMmToMt=fromMmToMt;exports.fromMmToCm=fromMmToCm;exports.fromMmToIn=fromMmToIn;exports.fromMmToFt=fromMmToFt;exports.fromMmToYd=fromMmToYd;exports.fromMmToMi=fromMmToMi;exports.fromInToKm=fromInToKm;exports.fromInToMt=fromInToMt;exports.fromInToCm=fromInToCm;exports.fromInToMm=fromInToMm;exports.fromInToFt=fromInToFt;exports.fromInToYd=fromInToYd;exports.fromInToMi=fromInToMi;exports.fromFtToKm=fromFtToKm;exports.fromFtToMt=fromFtToMt;exports.fromFtToCm=fromFtToCm;exports.fromFtToMm=fromFtToMm;exports.fromFtToIn=fromFtToIn;exports.fromFtToYd=fromFtToYd;exports.fromFtToMi=fromFtToMi;exports.fromYdToKm=fromYdToKm;exports.fromYdToMt=fromYdToMt;exports.fromYdToCm=fromYdToCm;exports.fromYdToMm=fromYdToMm;exports.fromYdToIn=fromYdToIn;exports.fromYdToFt=fromYdToFt;exports.fromYdToMi=fromYdToMi;exports.fromMiToKm=fromMiToKm;exports.fromMiToMt=fromMiToMt;exports.fromMiToCm=fromMiToCm;exports.fromMiToMm=fromMiToMm;exports.fromMiToYd=fromMiToYd;exports.fromMiToFt=fromMiToFt;exports.fromMiToIn=fromMiToIn;exports.convert=convert;exports.default=void 0;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const MMIN=0.03937007874;const INMM=25.4000000001016;function fromKmToMt(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromKmToCm(n){return(0,_common.isNumber)(n)?n*1000*100:NaN;}function fromKmToMm(n){return(0,_common.isNumber)(n)?n*1000*100*10:NaN;}function fromKmToIn(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN:NaN;}function fromKmToFt(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12:NaN;}function fromKmToYd(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12/3:NaN;}function fromKmToMi(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12/3/1760:NaN;}function fromMtToKm(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromMtToCm(n){return(0,_common.isNumber)(n)?n*100:NaN;}function fromMtToMm(n){return(0,_common.isNumber)(n)?n*100*10:NaN;}function fromMtToIn(n){return(0,_common.isNumber)(n)?n*10*100*MMIN:NaN;}function fromMtToFt(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12:NaN;}function fromMtToYd(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12/3:NaN;}function fromMtToMi(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12/3/1760:NaN;}function fromCmToKm(n){return(0,_common.isNumber)(n)?n/100/1000:NaN;}function fromCmToMt(n){return(0,_common.isNumber)(n)?n/100:NaN;}function fromCmToMm(n){return(0,_common.isNumber)(n)?n*10:NaN;}function fromCmToIn(n){return(0,_common.isNumber)(n)?n*10*MMIN:NaN;}function fromCmToFt(n){return(0,_common.isNumber)(n)?n*10*MMIN/12:NaN;}function fromCmToYd(n){return(0,_common.isNumber)(n)?n*10*MMIN/12/3:NaN;}function fromCmToMi(n){return(0,_common.isNumber)(n)?n*10*MMIN/12/3/1760:NaN;}function fromMmToKm(n){return(0,_common.isNumber)(n)?n/10/100/1000:NaN;}function fromMmToMt(n){return(0,_common.isNumber)(n)?n/10/100:NaN;}function fromMmToCm(n){return(0,_common.isNumber)(n)?n/10:NaN;}function fromMmToIn(n){return(0,_common.isNumber)(n)?n*MMIN:NaN;}function fromMmToFt(n){return(0,_common.isNumber)(n)?n*MMIN/12:NaN;}function fromMmToYd(n){return(0,_common.isNumber)(n)?n*MMIN/12/3:NaN;}function fromMmToMi(n){return(0,_common.isNumber)(n)?n*MMIN/12/3/1760:NaN;}function fromInToKm(n){return(0,_common.isNumber)(n)?n*INMM/10/100/1000:NaN;}function fromInToMt(n){return(0,_common.isNumber)(n)?n*INMM/10/100:NaN;}function fromInToCm(n){return(0,_common.isNumber)(n)?n*INMM/10:NaN;}function fromInToMm(n){return(0,_common.isNumber)(n)?n*INMM:NaN;}function fromInToFt(n){return(0,_common.isNumber)(n)?n/12:NaN;}function fromInToYd(n){return(0,_common.isNumber)(n)?n/12/3:NaN;}function fromInToMi(n){return(0,_common.isNumber)(n)?n/12/3/1760:NaN;}function fromFtToKm(n){return(0,_common.isNumber)(n)?n*12*INMM/10/100/1000:NaN;}function fromFtToMt(n){return(0,_common.isNumber)(n)?n*12*INMM/10/100:NaN;}function fromFtToCm(n){return(0,_common.isNumber)(n)?n*12*INMM/10:NaN;}function fromFtToMm(n){return(0,_common.isNumber)(n)?n*12*INMM:NaN;}function fromFtToIn(n){return(0,_common.isNumber)(n)?n*12:NaN;}function fromFtToYd(n){return(0,_common.isNumber)(n)?n/3:NaN;}function fromFtToMi(n){return(0,_common.isNumber)(n)?n/3/1760:NaN;}function fromYdToKm(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10/100/1000:NaN;}function fromYdToMt(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10/100:NaN;}function fromYdToCm(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10:NaN;}function fromYdToMm(n){return(0,_common.isNumber)(n)?n*3*12*INMM:NaN;}function fromYdToIn(n){return(0,_common.isNumber)(n)?n*3*12:NaN;}function fromYdToFt(n){return(0,_common.isNumber)(n)?n*3:NaN;}function fromYdToMi(n){return(0,_common.isNumber)(n)?n/1760:NaN;}function fromMiToKm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10/100/1000:NaN;}function fromMiToMt(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10/100:NaN;}function fromMiToCm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10:NaN;}function fromMiToMm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM:NaN;}function fromMiToYd(n){return(0,_common.isNumber)(n)?n*1760:NaN;}function fromMiToFt(n){return(0,_common.isNumber)(n)?n*1760*3:NaN;}function fromMiToIn(n){return(0,_common.isNumber)(n)?n*1760*3*12:NaN;}function convert(amount){return{fromKm:{toMt(){return fromKmToMt(amount);},toCm(){return fromKmToCm(amount);},toMm(){return fromKmToMm(amount);},toIn(){return fromKmToIn(amount);},toFt(){return fromKmToFt(amount);},toYd(){return fromKmToYd(amount);},toMi(){return fromKmToMi(amount);}},fromMt:{toKm(){return fromMtToKm(amount);},toCm(){return fromMtToCm(amount);},toMm(){return fromMtToMm(amount);},toIn(){return fromMtToIn(amount);},toFt(){return fromMtToFt(amount);},toYd(){return fromMtToYd(amount);},toMi(){return fromMtToMi(amount);}},fromCm:{toKm(){return fromCmToKm(amount);},toMt(){return fromCmToMt(amount);},toMm(){return fromCmToMm(amount);},toIn(){return fromCmToIn(amount);},toFt(){return fromCmToFt(amount);},toYd(){return fromCmToYd(amount);},toMi(){return fromCmToMi(amount);}},fromMm:{toKm(){return fromMmToKm(amount);},toMt(){return fromMmToMt(amount);},toCm(){return fromMmToCm(amount);},toIn(){return fromMmToIn(amount);},toFt(){return fromMmToFt(amount);},toYd(){return fromMmToYd(amount);},toMi(){return fromMmToMi(amount);}},fromIn:{toFt(){return fromInToFt(amount);},toYd(){return fromInToYd(amount);},toMi(){return fromInToMi(amount);},toKm(){return fromInToKm(amount);},toMt(){return fromInToMt(amount);},toCm(){return fromInToCm(amount);},toMm(){return fromInToMm(amount);}},fromFt:{toIn(){return fromFtToIn(amount);},toYd(){return fromFtToYd(amount);},toMi(){return fromFtToMi(amount);},toKm(){return fromFtToKm(amount);},toMt(){return fromFtToMt(amount);},toCm(){return fromFtToCm(amount);},toMm(){return fromFtToMm(amount);}},fromYd:{toIn(){return fromYdToIn(amount);},toFt(){return fromYdToFt(amount);},toMi(){return fromYdToMi(amount);},toKm(){return fromYdToKm(amount);},toMt(){return fromYdToMt(amount);},toCm(){return fromYdToCm(amount);},toMm(){return fromYdToMm(amount);}},fromMi:{toIn(){return fromMiToIn(amount);},toFt(){return fromMiToFt(amount);},toYd(){return fromMiToYd(amount);},toKm(){return fromMiToKm(amount);},toMt(){return fromMiToMt(amount);},toCm(){return fromMiToCm(amount);},toMm(){return fromMiToMm(amount);}}};}class Distance{}exports.default=Distance;_defineProperty(Distance,"fromKmToMt",fromKmToMt);_defineProperty(Distance,"fromKmToCm",fromKmToCm);_defineProperty(Distance,"fromKmToMm",fromKmToMm);_defineProperty(Distance,"fromKmToIn",fromKmToIn);_defineProperty(Distance,"fromKmToFt",fromKmToFt);_defineProperty(Distance,"fromKmToYd",fromKmToYd);_defineProperty(Distance,"fromKmToMi",fromKmToMi);_defineProperty(Distance,"fromMtToKm",fromMtToKm);_defineProperty(Distance,"fromMtToCm",fromMtToCm);_defineProperty(Distance,"fromMtToMm",fromMtToMm);_defineProperty(Distance,"fromMtToIn",fromMtToIn);_defineProperty(Distance,"fromMtToFt",fromMtToFt);_defineProperty(Distance,"fromMtToYd",fromMtToYd);_defineProperty(Distance,"fromMtToMi",fromMtToMi);_defineProperty(Distance,"fromCmToKm",fromCmToKm);_defineProperty(Distance,"fromCmToMt",fromCmToMt);_defineProperty(Distance,"fromCmToMm",fromCmToMm);_defineProperty(Distance,"fromCmToIn",fromCmToIn);_defineProperty(Distance,"fromCmToFt",fromCmToFt);_defineProperty(Distance,"fromCmToYd",fromCmToYd);_defineProperty(Distance,"fromCmToMi",fromCmToMi);_defineProperty(Distance,"fromMmToKm",fromMmToKm);_defineProperty(Distance,"fromMmToMt",fromMmToMt);_defineProperty(Distance,"fromMmToCm",fromMmToCm);_defineProperty(Distance,"fromMmToIn",fromMmToIn);_defineProperty(Distance,"fromMmToFt",fromMmToFt);_defineProperty(Distance,"fromMmToYd",fromMmToYd);_defineProperty(Distance,"fromMmToMi",fromMmToMi);_defineProperty(Distance,"fromInToKm",fromInToKm);_defineProperty(Distance,"fromInToMt",fromInToMt);_defineProperty(Distance,"fromInToCm",fromInToCm);_defineProperty(Distance,"fromInToMm",fromInToMm);_defineProperty(Distance,"fromInToFt",fromInToFt);_defineProperty(Distance,"fromInToYd",fromInToYd);_defineProperty(Distance,"fromInToMi",fromInToMi);_defineProperty(Distance,"fromFtToKm",fromFtToKm);_defineProperty(Distance,"fromFtToMt",fromFtToMt);_defineProperty(Distance,"fromFtToCm",fromFtToCm);_defineProperty(Distance,"fromFtToMm",fromFtToMm);_defineProperty(Distance,"fromFtToIn",fromFtToIn);_defineProperty(Distance,"fromFtToYd",fromFtToYd);_defineProperty(Distance,"fromFtToMi",fromFtToMi);_defineProperty(Distance,"fromYdToKm",fromYdToKm);_defineProperty(Distance,"fromYdToMt",fromYdToMt);_defineProperty(Distance,"fromYdToCm",fromYdToCm);_defineProperty(Distance,"fromYdToMm",fromYdToMm);_defineProperty(Distance,"fromYdToIn",fromYdToIn);_defineProperty(Distance,"fromYdToFt",fromYdToFt);_defineProperty(Distance,"fromYdToMi",fromYdToMi);_defineProperty(Distance,"fromMiToKm",fromMiToKm);_defineProperty(Distance,"fromMiToMt",fromMiToMt);_defineProperty(Distance,"fromMiToCm",fromMiToCm);_defineProperty(Distance,"fromMiToMm",fromMiToMm);_defineProperty(Distance,"fromMiToIn",fromMiToIn);_defineProperty(Distance,"fromMiToFt",fromMiToFt);_defineProperty(Distance,"fromMiToYd",fromMiToYd);_defineProperty(Distance,"convert",convert);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.convert=convert;exports.default=void 0;exports.fromCmToFt=fromCmToFt;exports.fromCmToIn=fromCmToIn;exports.fromCmToKm=fromCmToKm;exports.fromCmToMi=fromCmToMi;exports.fromCmToMm=fromCmToMm;exports.fromCmToMt=fromCmToMt;exports.fromCmToYd=fromCmToYd;exports.fromFtToCm=fromFtToCm;exports.fromFtToIn=fromFtToIn;exports.fromFtToKm=fromFtToKm;exports.fromFtToMi=fromFtToMi;exports.fromFtToMm=fromFtToMm;exports.fromFtToMt=fromFtToMt;exports.fromFtToYd=fromFtToYd;exports.fromInToCm=fromInToCm;exports.fromInToFt=fromInToFt;exports.fromInToKm=fromInToKm;exports.fromInToMi=fromInToMi;exports.fromInToMm=fromInToMm;exports.fromInToMt=fromInToMt;exports.fromInToYd=fromInToYd;exports.fromKmToCm=fromKmToCm;exports.fromKmToFt=fromKmToFt;exports.fromKmToIn=fromKmToIn;exports.fromKmToMi=fromKmToMi;exports.fromKmToMm=fromKmToMm;exports.fromKmToMt=fromKmToMt;exports.fromKmToYd=fromKmToYd;exports.fromMiToCm=fromMiToCm;exports.fromMiToFt=fromMiToFt;exports.fromMiToIn=fromMiToIn;exports.fromMiToKm=fromMiToKm;exports.fromMiToMm=fromMiToMm;exports.fromMiToMt=fromMiToMt;exports.fromMiToYd=fromMiToYd;exports.fromMmToCm=fromMmToCm;exports.fromMmToFt=fromMmToFt;exports.fromMmToIn=fromMmToIn;exports.fromMmToKm=fromMmToKm;exports.fromMmToMi=fromMmToMi;exports.fromMmToMt=fromMmToMt;exports.fromMmToYd=fromMmToYd;exports.fromMtToCm=fromMtToCm;exports.fromMtToFt=fromMtToFt;exports.fromMtToIn=fromMtToIn;exports.fromMtToKm=fromMtToKm;exports.fromMtToMi=fromMtToMi;exports.fromMtToMm=fromMtToMm;exports.fromMtToYd=fromMtToYd;exports.fromYdToCm=fromYdToCm;exports.fromYdToFt=fromYdToFt;exports.fromYdToIn=fromYdToIn;exports.fromYdToKm=fromYdToKm;exports.fromYdToMi=fromYdToMi;exports.fromYdToMm=fromYdToMm;exports.fromYdToMt=fromYdToMt;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const MMIN=0.03937007874;const INMM=25.4000000001016;function fromKmToMt(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromKmToCm(n){return(0,_common.isNumber)(n)?n*1000*100:NaN;}function fromKmToMm(n){return(0,_common.isNumber)(n)?n*1000*100*10:NaN;}function fromKmToIn(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN:NaN;}function fromKmToFt(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12:NaN;}function fromKmToYd(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12/3:NaN;}function fromKmToMi(n){return(0,_common.isNumber)(n)?n*10*100*1000*MMIN/12/3/1760:NaN;}function fromMtToKm(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromMtToCm(n){return(0,_common.isNumber)(n)?n*100:NaN;}function fromMtToMm(n){return(0,_common.isNumber)(n)?n*100*10:NaN;}function fromMtToIn(n){return(0,_common.isNumber)(n)?n*10*100*MMIN:NaN;}function fromMtToFt(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12:NaN;}function fromMtToYd(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12/3:NaN;}function fromMtToMi(n){return(0,_common.isNumber)(n)?n*10*100*MMIN/12/3/1760:NaN;}function fromCmToKm(n){return(0,_common.isNumber)(n)?n/100/1000:NaN;}function fromCmToMt(n){return(0,_common.isNumber)(n)?n/100:NaN;}function fromCmToMm(n){return(0,_common.isNumber)(n)?n*10:NaN;}function fromCmToIn(n){return(0,_common.isNumber)(n)?n*10*MMIN:NaN;}function fromCmToFt(n){return(0,_common.isNumber)(n)?n*10*MMIN/12:NaN;}function fromCmToYd(n){return(0,_common.isNumber)(n)?n*10*MMIN/12/3:NaN;}function fromCmToMi(n){return(0,_common.isNumber)(n)?n*10*MMIN/12/3/1760:NaN;}function fromMmToKm(n){return(0,_common.isNumber)(n)?n/10/100/1000:NaN;}function fromMmToMt(n){return(0,_common.isNumber)(n)?n/10/100:NaN;}function fromMmToCm(n){return(0,_common.isNumber)(n)?n/10:NaN;}function fromMmToIn(n){return(0,_common.isNumber)(n)?n*MMIN:NaN;}function fromMmToFt(n){return(0,_common.isNumber)(n)?n*MMIN/12:NaN;}function fromMmToYd(n){return(0,_common.isNumber)(n)?n*MMIN/12/3:NaN;}function fromMmToMi(n){return(0,_common.isNumber)(n)?n*MMIN/12/3/1760:NaN;}function fromInToKm(n){return(0,_common.isNumber)(n)?n*INMM/10/100/1000:NaN;}function fromInToMt(n){return(0,_common.isNumber)(n)?n*INMM/10/100:NaN;}function fromInToCm(n){return(0,_common.isNumber)(n)?n*INMM/10:NaN;}function fromInToMm(n){return(0,_common.isNumber)(n)?n*INMM:NaN;}function fromInToFt(n){return(0,_common.isNumber)(n)?n/12:NaN;}function fromInToYd(n){return(0,_common.isNumber)(n)?n/12/3:NaN;}function fromInToMi(n){return(0,_common.isNumber)(n)?n/12/3/1760:NaN;}function fromFtToKm(n){return(0,_common.isNumber)(n)?n*12*INMM/10/100/1000:NaN;}function fromFtToMt(n){return(0,_common.isNumber)(n)?n*12*INMM/10/100:NaN;}function fromFtToCm(n){return(0,_common.isNumber)(n)?n*12*INMM/10:NaN;}function fromFtToMm(n){return(0,_common.isNumber)(n)?n*12*INMM:NaN;}function fromFtToIn(n){return(0,_common.isNumber)(n)?n*12:NaN;}function fromFtToYd(n){return(0,_common.isNumber)(n)?n/3:NaN;}function fromFtToMi(n){return(0,_common.isNumber)(n)?n/3/1760:NaN;}function fromYdToKm(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10/100/1000:NaN;}function fromYdToMt(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10/100:NaN;}function fromYdToCm(n){return(0,_common.isNumber)(n)?n*3*12*INMM/10:NaN;}function fromYdToMm(n){return(0,_common.isNumber)(n)?n*3*12*INMM:NaN;}function fromYdToIn(n){return(0,_common.isNumber)(n)?n*3*12:NaN;}function fromYdToFt(n){return(0,_common.isNumber)(n)?n*3:NaN;}function fromYdToMi(n){return(0,_common.isNumber)(n)?n/1760:NaN;}function fromMiToKm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10/100/1000:NaN;}function fromMiToMt(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10/100:NaN;}function fromMiToCm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM/10:NaN;}function fromMiToMm(n){return(0,_common.isNumber)(n)?n*1760*3*12*INMM:NaN;}function fromMiToYd(n){return(0,_common.isNumber)(n)?n*1760:NaN;}function fromMiToFt(n){return(0,_common.isNumber)(n)?n*1760*3:NaN;}function fromMiToIn(n){return(0,_common.isNumber)(n)?n*1760*3*12:NaN;}function convert(amount){return{fromKm:{toMt(){return fromKmToMt(amount);},toCm(){return fromKmToCm(amount);},toMm(){return fromKmToMm(amount);},toIn(){return fromKmToIn(amount);},toFt(){return fromKmToFt(amount);},toYd(){return fromKmToYd(amount);},toMi(){return fromKmToMi(amount);}},fromMt:{toKm(){return fromMtToKm(amount);},toCm(){return fromMtToCm(amount);},toMm(){return fromMtToMm(amount);},toIn(){return fromMtToIn(amount);},toFt(){return fromMtToFt(amount);},toYd(){return fromMtToYd(amount);},toMi(){return fromMtToMi(amount);}},fromCm:{toKm(){return fromCmToKm(amount);},toMt(){return fromCmToMt(amount);},toMm(){return fromCmToMm(amount);},toIn(){return fromCmToIn(amount);},toFt(){return fromCmToFt(amount);},toYd(){return fromCmToYd(amount);},toMi(){return fromCmToMi(amount);}},fromMm:{toKm(){return fromMmToKm(amount);},toMt(){return fromMmToMt(amount);},toCm(){return fromMmToCm(amount);},toIn(){return fromMmToIn(amount);},toFt(){return fromMmToFt(amount);},toYd(){return fromMmToYd(amount);},toMi(){return fromMmToMi(amount);}},fromIn:{toFt(){return fromInToFt(amount);},toYd(){return fromInToYd(amount);},toMi(){return fromInToMi(amount);},toKm(){return fromInToKm(amount);},toMt(){return fromInToMt(amount);},toCm(){return fromInToCm(amount);},toMm(){return fromInToMm(amount);}},fromFt:{toIn(){return fromFtToIn(amount);},toYd(){return fromFtToYd(amount);},toMi(){return fromFtToMi(amount);},toKm(){return fromFtToKm(amount);},toMt(){return fromFtToMt(amount);},toCm(){return fromFtToCm(amount);},toMm(){return fromFtToMm(amount);}},fromYd:{toIn(){return fromYdToIn(amount);},toFt(){return fromYdToFt(amount);},toMi(){return fromYdToMi(amount);},toKm(){return fromYdToKm(amount);},toMt(){return fromYdToMt(amount);},toCm(){return fromYdToCm(amount);},toMm(){return fromYdToMm(amount);}},fromMi:{toIn(){return fromMiToIn(amount);},toFt(){return fromMiToFt(amount);},toYd(){return fromMiToYd(amount);},toKm(){return fromMiToKm(amount);},toMt(){return fromMiToMt(amount);},toCm(){return fromMiToCm(amount);},toMm(){return fromMiToMm(amount);}}};}class Distance{}exports.default=Distance;_defineProperty(Distance,"fromKmToMt",fromKmToMt);_defineProperty(Distance,"fromKmToCm",fromKmToCm);_defineProperty(Distance,"fromKmToMm",fromKmToMm);_defineProperty(Distance,"fromKmToIn",fromKmToIn);_defineProperty(Distance,"fromKmToFt",fromKmToFt);_defineProperty(Distance,"fromKmToYd",fromKmToYd);_defineProperty(Distance,"fromKmToMi",fromKmToMi);_defineProperty(Distance,"fromMtToKm",fromMtToKm);_defineProperty(Distance,"fromMtToCm",fromMtToCm);_defineProperty(Distance,"fromMtToMm",fromMtToMm);_defineProperty(Distance,"fromMtToIn",fromMtToIn);_defineProperty(Distance,"fromMtToFt",fromMtToFt);_defineProperty(Distance,"fromMtToYd",fromMtToYd);_defineProperty(Distance,"fromMtToMi",fromMtToMi);_defineProperty(Distance,"fromCmToKm",fromCmToKm);_defineProperty(Distance,"fromCmToMt",fromCmToMt);_defineProperty(Distance,"fromCmToMm",fromCmToMm);_defineProperty(Distance,"fromCmToIn",fromCmToIn);_defineProperty(Distance,"fromCmToFt",fromCmToFt);_defineProperty(Distance,"fromCmToYd",fromCmToYd);_defineProperty(Distance,"fromCmToMi",fromCmToMi);_defineProperty(Distance,"fromMmToKm",fromMmToKm);_defineProperty(Distance,"fromMmToMt",fromMmToMt);_defineProperty(Distance,"fromMmToCm",fromMmToCm);_defineProperty(Distance,"fromMmToIn",fromMmToIn);_defineProperty(Distance,"fromMmToFt",fromMmToFt);_defineProperty(Distance,"fromMmToYd",fromMmToYd);_defineProperty(Distance,"fromMmToMi",fromMmToMi);_defineProperty(Distance,"fromInToKm",fromInToKm);_defineProperty(Distance,"fromInToMt",fromInToMt);_defineProperty(Distance,"fromInToCm",fromInToCm);_defineProperty(Distance,"fromInToMm",fromInToMm);_defineProperty(Distance,"fromInToFt",fromInToFt);_defineProperty(Distance,"fromInToYd",fromInToYd);_defineProperty(Distance,"fromInToMi",fromInToMi);_defineProperty(Distance,"fromFtToKm",fromFtToKm);_defineProperty(Distance,"fromFtToMt",fromFtToMt);_defineProperty(Distance,"fromFtToCm",fromFtToCm);_defineProperty(Distance,"fromFtToMm",fromFtToMm);_defineProperty(Distance,"fromFtToIn",fromFtToIn);_defineProperty(Distance,"fromFtToYd",fromFtToYd);_defineProperty(Distance,"fromFtToMi",fromFtToMi);_defineProperty(Distance,"fromYdToKm",fromYdToKm);_defineProperty(Distance,"fromYdToMt",fromYdToMt);_defineProperty(Distance,"fromYdToCm",fromYdToCm);_defineProperty(Distance,"fromYdToMm",fromYdToMm);_defineProperty(Distance,"fromYdToIn",fromYdToIn);_defineProperty(Distance,"fromYdToFt",fromYdToFt);_defineProperty(Distance,"fromYdToMi",fromYdToMi);_defineProperty(Distance,"fromMiToKm",fromMiToKm);_defineProperty(Distance,"fromMiToMt",fromMiToMt);_defineProperty(Distance,"fromMiToCm",fromMiToCm);_defineProperty(Distance,"fromMiToMm",fromMiToMm);_defineProperty(Distance,"fromMiToIn",fromMiToIn);_defineProperty(Distance,"fromMiToFt",fromMiToFt);_defineProperty(Distance,"fromMiToYd",fromMiToYd);_defineProperty(Distance,"convert",convert);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getFibonacciFor=getFibonacciFor;exports.default=toFibonacci;var _common=require("../common");const FIBONACCI=[0,1,1];let fibonacci;function getFibonacciFor(n){return(0,_common.isNumber)(fibonacci=FIBONACCI[n])?fibonacci:FIBONACCI[n]=getFibonacciFor(n-1)+getFibonacciFor(n-2);}function toFibonacci(n){return(0,_common.isNumber)(n)?n>0?getFibonacciFor(n):0:NaN;}
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=toFibonacci;exports.getFibonacciFor=getFibonacciFor;var _common=require("../common");const FIBONACCI=[0,1,1];let fibonacci;function getFibonacciFor(n){return(0,_common.isNumber)(fibonacci=FIBONACCI[n])?fibonacci:FIBONACCI[n]=getFibonacciFor(n-1)+getFibonacciFor(n-2);}function toFibonacci(n){return(0,_common.isNumber)(n)?n>0?getFibonacciFor(n):0:NaN;}

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.fromHexToDec=fromHexToDec;exports.fromOctToDec=fromOctToDec;Object.defineProperty(exports,"fibonacci",{enumerable:true,get:function(){return _fibonacci.default;}});Object.defineProperty(exports,"haversine",{enumerable:true,get:function(){return _haversine.default;}});Object.defineProperty(exports,"Weight",{enumerable:true,get:function(){return _weight.default;}});Object.defineProperty(exports,"Temperature",{enumerable:true,get:function(){return _temperature.default;}});Object.defineProperty(exports,"Distance",{enumerable:true,get:function(){return _distance.default;}});exports.default=void 0;var _common=require("../common");var _fibonacci=_interopRequireDefault(require("./fibonacci"));var _haversine=_interopRequireDefault(require("./haversine"));var _weight=_interopRequireDefault(require("./weight"));var _temperature=_interopRequireDefault(require("./temperature"));var _distance=_interopRequireDefault(require("./distance"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OCT=8;const HEX=16;function fromHexToDec(v){return(0,_common.isString)(v)?parseInt(v,HEX):(0,_common.isNumber)(v)?v:NaN;}function fromOctToDec(v){return(0,_common.isString)(v)?parseInt(v,OCT):(0,_common.isNumber)(v)?v:NaN;}class NumberEngine{}exports.default=NumberEngine;_defineProperty(NumberEngine,"fibonacci",_fibonacci.default);_defineProperty(NumberEngine,"haversine",_haversine.default);_defineProperty(NumberEngine,"fromHexToDec",fromHexToDec);_defineProperty(NumberEngine,"fromOctToDec",fromOctToDec);_defineProperty(NumberEngine,"Temperature",_temperature.default);_defineProperty(NumberEngine,"Weight",_weight.default);_defineProperty(NumberEngine,"Distance",_distance.default);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Distance",{enumerable:true,get:function(){return _distance.default;}});Object.defineProperty(exports,"Temperature",{enumerable:true,get:function(){return _temperature.default;}});Object.defineProperty(exports,"Weight",{enumerable:true,get:function(){return _weight.default;}});exports.default=void 0;Object.defineProperty(exports,"fibonacci",{enumerable:true,get:function(){return _fibonacci.default;}});exports.fromHexToDec=fromHexToDec;exports.fromOctToDec=fromOctToDec;Object.defineProperty(exports,"haversine",{enumerable:true,get:function(){return _haversine.default;}});var _common=require("../common");var _fibonacci=_interopRequireDefault(require("./fibonacci"));var _haversine=_interopRequireDefault(require("./haversine"));var _weight=_interopRequireDefault(require("./weight"));var _temperature=_interopRequireDefault(require("./temperature"));var _distance=_interopRequireDefault(require("./distance"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OCT=8;const HEX=16;function fromHexToDec(v){return(0,_common.isString)(v)?parseInt(v,HEX):(0,_common.isNumber)(v)?v:NaN;}function fromOctToDec(v){return(0,_common.isString)(v)?parseInt(v,OCT):(0,_common.isNumber)(v)?v:NaN;}class NumberEngine{}exports.default=NumberEngine;_defineProperty(NumberEngine,"fibonacci",_fibonacci.default);_defineProperty(NumberEngine,"haversine",_haversine.default);_defineProperty(NumberEngine,"fromHexToDec",fromHexToDec);_defineProperty(NumberEngine,"fromOctToDec",fromOctToDec);_defineProperty(NumberEngine,"Temperature",_temperature.default);_defineProperty(NumberEngine,"Weight",_weight.default);_defineProperty(NumberEngine,"Distance",_distance.default);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.fromFToC=fromFToC;exports.fromCToF=fromCToF;exports.default=void 0;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function fromFToC(n){return(0,_common.isNumber)(n)?(n-32)/1.8:NaN;}function fromCToF(n){return(0,_common.isNumber)(n)?n*1.8+32:NaN;}class Temperature{}exports.default=Temperature;_defineProperty(Temperature,"fromFToC",fromFToC);_defineProperty(Temperature,"fromCToF",fromCToF);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.fromCToF=fromCToF;exports.fromFToC=fromFToC;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function fromFToC(n){return(0,_common.isNumber)(n)?(n-32)/1.8:NaN;}function fromCToF(n){return(0,_common.isNumber)(n)?n*1.8+32:NaN;}class Temperature{}exports.default=Temperature;_defineProperty(Temperature,"fromFToC",fromFToC);_defineProperty(Temperature,"fromCToF",fromCToF);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.fromKgToGr=fromKgToGr;exports.fromKgToMg=fromKgToMg;exports.fromKgToOz=fromKgToOz;exports.fromKgToLb=fromKgToLb;exports.fromKgToSt=fromKgToSt;exports.fromGrToKg=fromGrToKg;exports.fromGrToMg=fromGrToMg;exports.fromGrToOz=fromGrToOz;exports.fromGrToLb=fromGrToLb;exports.fromGrToSt=fromGrToSt;exports.fromMgToKg=fromMgToKg;exports.fromMgToGr=fromMgToGr;exports.fromMgToOz=fromMgToOz;exports.fromMgToLb=fromMgToLb;exports.fromMgToSt=fromMgToSt;exports.fromOzToMg=fromOzToMg;exports.fromOzToSt=fromOzToSt;exports.fromOzToLb=fromOzToLb;exports.fromLbToKg=fromLbToKg;exports.fromLbToGr=fromLbToGr;exports.fromLbToMg=fromLbToMg;exports.fromLbToSt=fromLbToSt;exports.fromLbToOz=fromLbToOz;exports.fromStToKg=fromStToKg;exports.fromStToGr=fromStToGr;exports.fromStToMg=fromStToMg;exports.fromStToOz=fromStToOz;exports.fromStToLb=fromStToLb;exports.fromOzToKg=fromOzToKg;exports.fromOzToGr=fromOzToGr;exports.convert=convert;exports.default=void 0;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OZGR=28.349523124662777;const GROZ=0.03527396195;function fromKgToGr(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromKgToMg(n){return(0,_common.isNumber)(n)?n*1000*1000:NaN;}function fromKgToOz(n){return(0,_common.isNumber)(n)?n*1000*GROZ:NaN;}function fromKgToLb(n){return(0,_common.isNumber)(n)?n*1000*GROZ/16:NaN;}function fromKgToSt(n){return(0,_common.isNumber)(n)?n*1000*GROZ/16/14:NaN;}function fromGrToKg(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromGrToMg(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromGrToOz(n){return(0,_common.isNumber)(n)?n*GROZ:NaN;}function fromGrToLb(n){return(0,_common.isNumber)(n)?n*GROZ/16:NaN;}function fromGrToSt(n){return(0,_common.isNumber)(n)?n*GROZ/16/14:NaN;}function fromMgToKg(n){return(0,_common.isNumber)(n)?n/1000/1000:NaN;}function fromMgToGr(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromMgToOz(n){return(0,_common.isNumber)(n)?n/1000*GROZ:NaN;}function fromMgToLb(n){return(0,_common.isNumber)(n)?n/1000*GROZ/16:NaN;}function fromMgToSt(n){return(0,_common.isNumber)(n)?n/1000*GROZ/16/14:NaN;}function fromOzToMg(n){return(0,_common.isNumber)(n)?n*OZGR*1000:NaN;}function fromOzToSt(n){return(0,_common.isNumber)(n)?n/16/14:NaN;}function fromOzToLb(n){return(0,_common.isNumber)(n)?n/16:NaN;}function fromLbToKg(n){return(0,_common.isNumber)(n)?n*16*OZGR/1000:NaN;}function fromLbToGr(n){return(0,_common.isNumber)(n)?n*16*OZGR:NaN;}function fromLbToMg(n){return(0,_common.isNumber)(n)?n*16*OZGR*1000:NaN;}function fromLbToSt(n){return(0,_common.isNumber)(n)?n/14:NaN;}function fromLbToOz(n){return(0,_common.isNumber)(n)?n*16:NaN;}function fromStToKg(n){return(0,_common.isNumber)(n)?n*14*16*OZGR/1000:NaN;}function fromStToGr(n){return(0,_common.isNumber)(n)?n*14*16*OZGR:NaN;}function fromStToMg(n){return(0,_common.isNumber)(n)?n*14*16*OZGR*1000:NaN;}function fromStToOz(n){return(0,_common.isNumber)(n)?n*14*16:NaN;}function fromStToLb(n){return(0,_common.isNumber)(n)?n*14:NaN;}function fromOzToKg(n){return(0,_common.isNumber)(n)?n*OZGR/1000:NaN;}function fromOzToGr(n){return(0,_common.isNumber)(n)?n*OZGR:NaN;}function convert(amount){return{fromKg:{toGr(){return fromKgToGr(amount);},toMg(){return fromKgToMg(amount);},toOz(){return fromKgToOz(amount);},toLb(){return fromKgToLb(amount);},toSt(){return fromKgToSt(amount);}},fromGr:{toKg(){return fromGrToKg(amount);},toMg(){return fromGrToMg(amount);},toOz(){return fromGrToOz(amount);},toLb(){return fromGrToLb(amount);},toSt(){return fromGrToSt(amount);}},fromMg:{toKg(){return fromMgToKg(amount);},toGr(){return fromMgToGr(amount);},toOz(){return fromMgToOz(amount);},toLb(){return fromMgToLb(amount);},toSt(){return fromMgToSt(amount);}},fromOz:{toKg(){return fromOzToKg(amount);},toGr(){return fromOzToGr(amount);},toMg(){return fromOzToMg(amount);},toLb(){return fromOzToLb(amount);},toSt(){return fromOzToSt(amount);}},fromLb:{toKg(){return fromLbToKg(amount);},toGr(){return fromLbToGr(amount);},toMg(){return fromLbToMg(amount);},toOz(){return fromLbToOz(amount);},toSt(){return fromLbToSt(amount);}},fromSt:{toKg(){return fromStToKg(amount);},toGr(){return fromStToGr(amount);},toMg(){return fromStToMg(amount);},toLb(){return fromStToLb(amount);},toOz(){return fromStToOz(amount);}}};}class Weight{}exports.default=Weight;_defineProperty(Weight,"fromKgToGr",fromKgToGr);_defineProperty(Weight,"fromKgToMg",fromKgToMg);_defineProperty(Weight,"fromKgToOz",fromKgToOz);_defineProperty(Weight,"fromKgToLb",fromKgToLb);_defineProperty(Weight,"fromKgToSt",fromKgToSt);_defineProperty(Weight,"fromGrToKg",fromGrToKg);_defineProperty(Weight,"fromGrToMg",fromGrToMg);_defineProperty(Weight,"fromGrToOz",fromGrToOz);_defineProperty(Weight,"fromGrToLb",fromGrToLb);_defineProperty(Weight,"fromGrToSt",fromGrToSt);_defineProperty(Weight,"fromMgToKg",fromMgToKg);_defineProperty(Weight,"fromMgToGr",fromMgToGr);_defineProperty(Weight,"fromMgToOz",fromMgToOz);_defineProperty(Weight,"fromMgToLb",fromMgToLb);_defineProperty(Weight,"fromMgToSt",fromMgToSt);_defineProperty(Weight,"fromOzToKg",fromOzToKg);_defineProperty(Weight,"fromOzToGr",fromOzToGr);_defineProperty(Weight,"fromOzToMg",fromOzToMg);_defineProperty(Weight,"fromOzToLb",fromOzToLb);_defineProperty(Weight,"fromOzToSt",fromOzToSt);_defineProperty(Weight,"fromLbToKg",fromLbToKg);_defineProperty(Weight,"fromLbToGr",fromLbToGr);_defineProperty(Weight,"fromLbToMg",fromLbToMg);_defineProperty(Weight,"fromLbToOz",fromLbToOz);_defineProperty(Weight,"fromLbToSt",fromLbToSt);_defineProperty(Weight,"fromStToKg",fromStToKg);_defineProperty(Weight,"fromStToGr",fromStToGr);_defineProperty(Weight,"fromStToMg",fromStToMg);_defineProperty(Weight,"fromStToLb",fromStToLb);_defineProperty(Weight,"fromStToOz",fromStToOz);_defineProperty(Weight,"convert",convert);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.convert=convert;exports.default=void 0;exports.fromGrToKg=fromGrToKg;exports.fromGrToLb=fromGrToLb;exports.fromGrToMg=fromGrToMg;exports.fromGrToOz=fromGrToOz;exports.fromGrToSt=fromGrToSt;exports.fromKgToGr=fromKgToGr;exports.fromKgToLb=fromKgToLb;exports.fromKgToMg=fromKgToMg;exports.fromKgToOz=fromKgToOz;exports.fromKgToSt=fromKgToSt;exports.fromLbToGr=fromLbToGr;exports.fromLbToKg=fromLbToKg;exports.fromLbToMg=fromLbToMg;exports.fromLbToOz=fromLbToOz;exports.fromLbToSt=fromLbToSt;exports.fromMgToGr=fromMgToGr;exports.fromMgToKg=fromMgToKg;exports.fromMgToLb=fromMgToLb;exports.fromMgToOz=fromMgToOz;exports.fromMgToSt=fromMgToSt;exports.fromOzToGr=fromOzToGr;exports.fromOzToKg=fromOzToKg;exports.fromOzToLb=fromOzToLb;exports.fromOzToMg=fromOzToMg;exports.fromOzToSt=fromOzToSt;exports.fromStToGr=fromStToGr;exports.fromStToKg=fromStToKg;exports.fromStToLb=fromStToLb;exports.fromStToMg=fromStToMg;exports.fromStToOz=fromStToOz;var _common=require("../common");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OZGR=28.349523124662777;const GROZ=0.03527396195;function fromKgToGr(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromKgToMg(n){return(0,_common.isNumber)(n)?n*1000*1000:NaN;}function fromKgToOz(n){return(0,_common.isNumber)(n)?n*1000*GROZ:NaN;}function fromKgToLb(n){return(0,_common.isNumber)(n)?n*1000*GROZ/16:NaN;}function fromKgToSt(n){return(0,_common.isNumber)(n)?n*1000*GROZ/16/14:NaN;}function fromGrToKg(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromGrToMg(n){return(0,_common.isNumber)(n)?n*1000:NaN;}function fromGrToOz(n){return(0,_common.isNumber)(n)?n*GROZ:NaN;}function fromGrToLb(n){return(0,_common.isNumber)(n)?n*GROZ/16:NaN;}function fromGrToSt(n){return(0,_common.isNumber)(n)?n*GROZ/16/14:NaN;}function fromMgToKg(n){return(0,_common.isNumber)(n)?n/1000/1000:NaN;}function fromMgToGr(n){return(0,_common.isNumber)(n)?n/1000:NaN;}function fromMgToOz(n){return(0,_common.isNumber)(n)?n/1000*GROZ:NaN;}function fromMgToLb(n){return(0,_common.isNumber)(n)?n/1000*GROZ/16:NaN;}function fromMgToSt(n){return(0,_common.isNumber)(n)?n/1000*GROZ/16/14:NaN;}function fromOzToMg(n){return(0,_common.isNumber)(n)?n*OZGR*1000:NaN;}function fromOzToSt(n){return(0,_common.isNumber)(n)?n/16/14:NaN;}function fromOzToLb(n){return(0,_common.isNumber)(n)?n/16:NaN;}function fromLbToKg(n){return(0,_common.isNumber)(n)?n*16*OZGR/1000:NaN;}function fromLbToGr(n){return(0,_common.isNumber)(n)?n*16*OZGR:NaN;}function fromLbToMg(n){return(0,_common.isNumber)(n)?n*16*OZGR*1000:NaN;}function fromLbToSt(n){return(0,_common.isNumber)(n)?n/14:NaN;}function fromLbToOz(n){return(0,_common.isNumber)(n)?n*16:NaN;}function fromStToKg(n){return(0,_common.isNumber)(n)?n*14*16*OZGR/1000:NaN;}function fromStToGr(n){return(0,_common.isNumber)(n)?n*14*16*OZGR:NaN;}function fromStToMg(n){return(0,_common.isNumber)(n)?n*14*16*OZGR*1000:NaN;}function fromStToOz(n){return(0,_common.isNumber)(n)?n*14*16:NaN;}function fromStToLb(n){return(0,_common.isNumber)(n)?n*14:NaN;}function fromOzToKg(n){return(0,_common.isNumber)(n)?n*OZGR/1000:NaN;}function fromOzToGr(n){return(0,_common.isNumber)(n)?n*OZGR:NaN;}function convert(amount){return{fromKg:{toGr(){return fromKgToGr(amount);},toMg(){return fromKgToMg(amount);},toOz(){return fromKgToOz(amount);},toLb(){return fromKgToLb(amount);},toSt(){return fromKgToSt(amount);}},fromGr:{toKg(){return fromGrToKg(amount);},toMg(){return fromGrToMg(amount);},toOz(){return fromGrToOz(amount);},toLb(){return fromGrToLb(amount);},toSt(){return fromGrToSt(amount);}},fromMg:{toKg(){return fromMgToKg(amount);},toGr(){return fromMgToGr(amount);},toOz(){return fromMgToOz(amount);},toLb(){return fromMgToLb(amount);},toSt(){return fromMgToSt(amount);}},fromOz:{toKg(){return fromOzToKg(amount);},toGr(){return fromOzToGr(amount);},toMg(){return fromOzToMg(amount);},toLb(){return fromOzToLb(amount);},toSt(){return fromOzToSt(amount);}},fromLb:{toKg(){return fromLbToKg(amount);},toGr(){return fromLbToGr(amount);},toMg(){return fromLbToMg(amount);},toOz(){return fromLbToOz(amount);},toSt(){return fromLbToSt(amount);}},fromSt:{toKg(){return fromStToKg(amount);},toGr(){return fromStToGr(amount);},toMg(){return fromStToMg(amount);},toLb(){return fromStToLb(amount);},toOz(){return fromStToOz(amount);}}};}class Weight{}exports.default=Weight;_defineProperty(Weight,"fromKgToGr",fromKgToGr);_defineProperty(Weight,"fromKgToMg",fromKgToMg);_defineProperty(Weight,"fromKgToOz",fromKgToOz);_defineProperty(Weight,"fromKgToLb",fromKgToLb);_defineProperty(Weight,"fromKgToSt",fromKgToSt);_defineProperty(Weight,"fromGrToKg",fromGrToKg);_defineProperty(Weight,"fromGrToMg",fromGrToMg);_defineProperty(Weight,"fromGrToOz",fromGrToOz);_defineProperty(Weight,"fromGrToLb",fromGrToLb);_defineProperty(Weight,"fromGrToSt",fromGrToSt);_defineProperty(Weight,"fromMgToKg",fromMgToKg);_defineProperty(Weight,"fromMgToGr",fromMgToGr);_defineProperty(Weight,"fromMgToOz",fromMgToOz);_defineProperty(Weight,"fromMgToLb",fromMgToLb);_defineProperty(Weight,"fromMgToSt",fromMgToSt);_defineProperty(Weight,"fromOzToKg",fromOzToKg);_defineProperty(Weight,"fromOzToGr",fromOzToGr);_defineProperty(Weight,"fromOzToMg",fromOzToMg);_defineProperty(Weight,"fromOzToLb",fromOzToLb);_defineProperty(Weight,"fromOzToSt",fromOzToSt);_defineProperty(Weight,"fromLbToKg",fromLbToKg);_defineProperty(Weight,"fromLbToGr",fromLbToGr);_defineProperty(Weight,"fromLbToMg",fromLbToMg);_defineProperty(Weight,"fromLbToOz",fromLbToOz);_defineProperty(Weight,"fromLbToSt",fromLbToSt);_defineProperty(Weight,"fromStToKg",fromStToKg);_defineProperty(Weight,"fromStToGr",fromStToGr);_defineProperty(Weight,"fromStToMg",fromStToMg);_defineProperty(Weight,"fromStToLb",fromStToLb);_defineProperty(Weight,"fromStToOz",fromStToOz);_defineProperty(Weight,"convert",convert);

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

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.charAt=charAt;exports.codePointAt=codePointAt;exports.charOf=charOf;exports.codePointOf=codePointOf;exports.entityAt=entityAt;exports.entityCodeAt=entityCodeAt;exports.entityNameAt=entityNameAt;exports.entityOf=entityOf;exports.fromCodePoint=fromCodePoint;exports.charFromEntityCode=charFromEntityCode;exports.charFromEntityName=charFromEntityName;exports.toEntityCode=toEntityCode;exports.toEntityName=toEntityName;exports.entityCodeFromChar=entityCodeFromChar;exports.entityNameFromChar=entityNameFromChar;exports.entityCodeOf=entityCodeOf;exports.entityNameOf=entityNameOf;exports.fromDecToHex=fromDecToHex;exports.fromDecToOct=fromDecToOct;exports.reverse=reverse;exports.default=void 0;var _common=require("../common");var _string=require("../common/string");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OCT=8;const DEC=10;const HEX=16;const X=/\u0026[\w]+\u003b|\u0026\u0023(?:[1-9]+[\d]+|[1-9])\u003b+/g;const XCODE=/\u0026\u0023(?:[1-9]+[\d]+|[1-9]+)\u003b+/g;const XNAME=/\u0026[\w]+\u003b+/g;const ACHAR='&';const ACHARCODE=38;const AENTITYNAME='&amp;';const AENTITYCODE='&#38;';function charAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){let v=s.charAt(i);if(v===ACHAR){X.lastIndex=i;const m=X.exec(s);if(m===null){return ACHAR;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c;if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c;return ACHAR;}}else{return v;}}return null;}function codePointAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){let v=s.codePointAt(i);if(v===ACHARCODE){X.lastIndex=i;const m=X.exec(s);if(m===null){return ACHARCODE;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c.codePointAt(0);if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c.codePointAt(0);return ACHARCODE;}}else{return v;}}return null;}function charOf(s){if((0,_common.isString)(s)){if(s.length<4){return s.charAt(0);}else{let v=s.charAt(0);if(v===ACHAR){X.lastIndex=0;const m=X.exec(s);if(m===null){return ACHAR;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c;if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c;return ACHAR;}}else{return v;}}}return null;}function codePointOf(s){if((0,_common.isString)(s)){if(s.length<4){return s.codePointAt(0);}else{let v=s.codePointAt(0);if(v===ACHARCODE){X.lastIndex=0;const m=X.exec(s);if(m===null){return ACHARCODE;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c.codePointAt(0);if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c.codePointAt(0);return ACHARCODE;}}else{return v;}}}return null;}function entityAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){X.lastIndex=i;const m=X.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function entityCodeAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){XCODE.lastIndex=i;const m=XCODE.exec(s);return m===null?AENTITYCODE:m.shift();}else{let c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function entityNameAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){XNAME.lastIndex=i;const m=XNAME.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;return v;}}return null;}function entityOf(s){if((0,_common.isString)(s)){const v=s.charAt(0);if(v===ACHAR){X.lastIndex=0;const m=X.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function fromCodePoint(i){return(0,_common.isNumber)(i)?(0,_string.getFromCodePoint)(i):null;}function charFromEntityCode(s){return(0,_common.isString)(s)?(0,_string.getCharFromEntityCode)(s):null;}function charFromEntityName(s){return(0,_common.isString)(s)?(0,_string.getCharFromEntityName)(s):null;}function toEntityCode(s){if((0,_common.isString)(s)){let i=0;const j=s.length;let c,h;let r='';for(i,j;i<j;i=i+1){c=s.charAt(i);h=(0,_string.getEntityCodeFromChar)(c);r=r+(h===null?c:h);}return r;}return null;}function toEntityName(s){if((0,_common.isString)(s)){let i=0;const j=s.length;let c,h;let r='';for(i,j;i<j;i=i+1){c=s.charAt(i);h=(0,_string.getEntityNameFromChar)(c);r=r+(h===null?c:h);}return r;}return null;}function entityCodeFromChar(s){return(0,_common.isString)(s)&&s.length===1?(0,_string.getEntityCodeFromChar)(s):null;}function entityNameFromChar(s){return(0,_common.isString)(s)&&s.length===1?_string.entityNameFromCharMap.has(s)?_string.entityNameFromCharMap.get(s):s:null;}function entityCodeOf(s){return(0,_common.isString)(s)&&s.length===1?(0,_string.getEntityCodeFromChar)(s):null;}function entityNameOf(s){return(0,_common.isString)(s)&&s.length===1?_string.entityNameFromCharMap.has(s)?_string.entityNameFromCharMap.get(s):s:null;}function fromDecToHex(v){return(0,_common.isNumber)(v)?v.toString(HEX):(0,_common.isString)(v)?isNaN(v=parseInt(v,DEC))?null:v.toString(HEX):null;}function fromDecToOct(v){return(0,_common.isNumber)(v)?v.toString(OCT):(0,_common.isString)(v)?isNaN(v=parseInt(v,DEC))?null:v.toString(OCT):null;}function reverse(string){if((0,_common.isString)(string)){let s='';let i=string.length;do{s=s+string.charAt(--i);}while(i>0);return s;}return null;}class StringEngine{}exports.default=StringEngine;_defineProperty(StringEngine,"charAt",charAt);_defineProperty(StringEngine,"codePointAt",codePointAt);_defineProperty(StringEngine,"charOf",charOf);_defineProperty(StringEngine,"codePointOf",codePointOf);_defineProperty(StringEngine,"entityAt",entityAt);_defineProperty(StringEngine,"entityCodeAt",entityCodeAt);_defineProperty(StringEngine,"entityNameAt",entityNameAt);_defineProperty(StringEngine,"entityOf",entityOf);_defineProperty(StringEngine,"fromCodePoint",fromCodePoint);_defineProperty(StringEngine,"charFromEntityCode",charFromEntityCode);_defineProperty(StringEngine,"charFromEntityName",charFromEntityName);_defineProperty(StringEngine,"toEntityCode",toEntityCode);_defineProperty(StringEngine,"toEntityName",toEntityName);_defineProperty(StringEngine,"entityCodeFromChar",entityCodeFromChar);_defineProperty(StringEngine,"entityNameFromChar",entityNameFromChar);_defineProperty(StringEngine,"entityCodeOf",entityCodeOf);_defineProperty(StringEngine,"entityNameOf",entityNameOf);_defineProperty(StringEngine,"fromDecToHex",fromDecToHex);_defineProperty(StringEngine,"fromDecToOct",fromDecToOct);_defineProperty(StringEngine,"reverse",reverse);
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.charAt=charAt;exports.charFromEntityCode=charFromEntityCode;exports.charFromEntityName=charFromEntityName;exports.charOf=charOf;exports.codePointAt=codePointAt;exports.codePointOf=codePointOf;exports.default=void 0;exports.entityAt=entityAt;exports.entityCodeAt=entityCodeAt;exports.entityCodeFromChar=entityCodeFromChar;exports.entityCodeOf=entityCodeOf;exports.entityNameAt=entityNameAt;exports.entityNameFromChar=entityNameFromChar;exports.entityNameOf=entityNameOf;exports.entityOf=entityOf;exports.fromCodePoint=fromCodePoint;exports.fromDecToHex=fromDecToHex;exports.fromDecToOct=fromDecToOct;exports.reverse=reverse;exports.toEntityCode=toEntityCode;exports.toEntityName=toEntityName;var _common=require("../common");var _string=require("../common/string");function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}const OCT=8;const DEC=10;const HEX=16;const X=/\u0026[\w]+\u003b|\u0026\u0023(?:[1-9]+[\d]+|[1-9])\u003b+/g;const XCODE=/\u0026\u0023(?:[1-9]+[\d]+|[1-9]+)\u003b+/g;const XNAME=/\u0026[\w]+\u003b+/g;const ACHAR='&';const ACHARCODE=38;const AENTITYNAME='&amp;';const AENTITYCODE='&#38;';function charAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){let v=s.charAt(i);if(v===ACHAR){X.lastIndex=i;const m=X.exec(s);if(m===null){return ACHAR;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c;if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c;return ACHAR;}}else{return v;}}return null;}function codePointAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){let v=s.codePointAt(i);if(v===ACHARCODE){X.lastIndex=i;const m=X.exec(s);if(m===null){return ACHARCODE;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c.codePointAt(0);if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c.codePointAt(0);return ACHARCODE;}}else{return v;}}return null;}function charOf(s){if((0,_common.isString)(s)){if(s.length<4){return s.charAt(0);}else{let v=s.charAt(0);if(v===ACHAR){X.lastIndex=0;const m=X.exec(s);if(m===null){return ACHAR;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c;if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c;return ACHAR;}}else{return v;}}}return null;}function codePointOf(s){if((0,_common.isString)(s)){if(s.length<4){return s.codePointAt(0);}else{let v=s.codePointAt(0);if(v===ACHARCODE){X.lastIndex=0;const m=X.exec(s);if(m===null){return ACHARCODE;}else{v=m.shift();let c;if((c=(0,_string.getCharFromEntityName)(v))!==null)return c.codePointAt(0);if((c=(0,_string.getCharFromEntityCode)(v))!==null)return c.codePointAt(0);return ACHARCODE;}}else{return v;}}}return null;}function entityAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){X.lastIndex=i;const m=X.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function entityCodeAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){XCODE.lastIndex=i;const m=XCODE.exec(s);return m===null?AENTITYCODE:m.shift();}else{let c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function entityNameAt(s,i){if((0,_common.isString)(s)&&(0,_common.isNumber)(i)){const v=s.charAt(i);if(v===ACHAR){XNAME.lastIndex=i;const m=XNAME.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;return v;}}return null;}function entityOf(s){if((0,_common.isString)(s)){const v=s.charAt(0);if(v===ACHAR){X.lastIndex=0;const m=X.exec(s);return m===null?AENTITYNAME:m.shift();}else{let c;if((c=(0,_string.getEntityNameFromChar)(v))!==null)return c;if((c=(0,_string.getEntityCodeFromChar)(v))!==null)return c;return v;}}return null;}function fromCodePoint(i){return(0,_common.isNumber)(i)?(0,_string.getFromCodePoint)(i):null;}function charFromEntityCode(s){return(0,_common.isString)(s)?(0,_string.getCharFromEntityCode)(s):null;}function charFromEntityName(s){return(0,_common.isString)(s)?(0,_string.getCharFromEntityName)(s):null;}function toEntityCode(s){if((0,_common.isString)(s)){let i=0;const j=s.length;let c,h;let r='';for(i,j;i<j;i=i+1){c=s.charAt(i);h=(0,_string.getEntityCodeFromChar)(c);r=r+(h===null?c:h);}return r;}return null;}function toEntityName(s){if((0,_common.isString)(s)){let i=0;const j=s.length;let c,h;let r='';for(i,j;i<j;i=i+1){c=s.charAt(i);h=(0,_string.getEntityNameFromChar)(c);r=r+(h===null?c:h);}return r;}return null;}function entityCodeFromChar(s){return(0,_common.isString)(s)&&s.length===1?(0,_string.getEntityCodeFromChar)(s):null;}function entityNameFromChar(s){return(0,_common.isString)(s)&&s.length===1?_string.entityNameFromCharMap.has(s)?_string.entityNameFromCharMap.get(s):s:null;}function entityCodeOf(s){return(0,_common.isString)(s)&&s.length===1?(0,_string.getEntityCodeFromChar)(s):null;}function entityNameOf(s){return(0,_common.isString)(s)&&s.length===1?_string.entityNameFromCharMap.has(s)?_string.entityNameFromCharMap.get(s):s:null;}function fromDecToHex(v){return(0,_common.isNumber)(v)?v.toString(HEX):(0,_common.isString)(v)?isNaN(v=parseInt(v,DEC))?null:v.toString(HEX):null;}function fromDecToOct(v){return(0,_common.isNumber)(v)?v.toString(OCT):(0,_common.isString)(v)?isNaN(v=parseInt(v,DEC))?null:v.toString(OCT):null;}function reverse(string){if((0,_common.isString)(string)){let s='';let i=string.length;do{s=s+string.charAt(--i);}while(i>0);return s;}return null;}class StringEngine{}exports.default=StringEngine;_defineProperty(StringEngine,"charAt",charAt);_defineProperty(StringEngine,"codePointAt",codePointAt);_defineProperty(StringEngine,"charOf",charOf);_defineProperty(StringEngine,"codePointOf",codePointOf);_defineProperty(StringEngine,"entityAt",entityAt);_defineProperty(StringEngine,"entityCodeAt",entityCodeAt);_defineProperty(StringEngine,"entityNameAt",entityNameAt);_defineProperty(StringEngine,"entityOf",entityOf);_defineProperty(StringEngine,"fromCodePoint",fromCodePoint);_defineProperty(StringEngine,"charFromEntityCode",charFromEntityCode);_defineProperty(StringEngine,"charFromEntityName",charFromEntityName);_defineProperty(StringEngine,"toEntityCode",toEntityCode);_defineProperty(StringEngine,"toEntityName",toEntityName);_defineProperty(StringEngine,"entityCodeFromChar",entityCodeFromChar);_defineProperty(StringEngine,"entityNameFromChar",entityNameFromChar);_defineProperty(StringEngine,"entityCodeOf",entityCodeOf);_defineProperty(StringEngine,"entityNameOf",entityNameOf);_defineProperty(StringEngine,"fromDecToHex",fromDecToHex);_defineProperty(StringEngine,"fromDecToOct",fromDecToOct);_defineProperty(StringEngine,"reverse",reverse);
{
"name": "difference-engine",
"version": "1.1.2",
"version": "1.1.3",
"description": "Difference Engine",

@@ -18,3 +18,3 @@ "main": "./index.js",

"babel": "babel src -d lib",
"clean": "npx rimraf lib",
"clean": "rimraf lib",
"build": "npm run clean && npm run babel",

@@ -24,29 +24,31 @@ "prepare": "npm run build",

"test": "mocha test --recursive -r @babel/register",
"lint": "eslint *.js src build test",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"pre-commit": "gulp pre-commit && npm run lint:fix && npm run test && git add src/common/string"
"pre-commit": "gulp pre-commit && npm run lint:fix && npm run test && npm run build && git add src/common/string lib"
},
"devDependencies": {
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/eslint-parser": "^7.14.3",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-export-default-from": "^7.12.13",
"@babel/plugin-proposal-export-namespace-from": "^7.14.2",
"@babel/preset-env": "^7.14.2",
"@babel/register": "^7.13.16",
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.8",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-export-default-from": "^7.16.7",
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.17.7",
"babel-plugin-module-resolver": "^4.1.0",
"chai": "^4.3.4",
"core-js": "^3.12.1",
"eslint": "^7.27.0",
"chai": "^4.3.6",
"core-js": "^3.21.1",
"eslint": "7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-import-resolver-babel-module": "^5.3.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "5.2.0",
"gulp": "^4.0.2",
"husky": "^6.0.0",
"mocha": "^8.4.0",
"husky": "^7.0.4",
"mocha": "^9.2.2",
"moment": "^2.29.1",
"rimraf": "^3.0.2",
"sacred-fs": "^1.2.1",
"sinon": "^10.0.0",
"standard": "^16.0.3"
"sinon": "^13.0.1"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc