Comparing version 0.1.4 to 1.0.0
@@ -1,1 +0,11 @@ | ||
module.exports=function(r){r=r.replace(/[- ]/g,"").replace(/^(?:\+|00)?86/,"");var e=require("./readnumber");var a=e(r);if(!a){return null}var d=require("./readaddress");var n=require("./readsp");var i=d(a.addressIndex);var u=n(a.spIndex);return{province:i.province,city:i.city,sp:u}}; | ||
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"rfCw":[function(require,module,exports) { | ||
var r,o,f=require("fs"),e=!1,a=function(l,u,i,v,n,t,c){if((void 0===c||c>=i)&&(c=(i+u)/2),c=v(Math.floor(c)),r===u&&o===i){if(e)return e=!1,null;c=v(Math.floor(c),!0),e=!0}else e=!1;r=u,o=i;for(var d=Buffer.alloc(0),s=c;!n(d);){var B=Buffer.alloc(1);f.readSync(l,B,0,1,s++),d=Buffer.concat([d,B])}var h=t(d);return 0===h?(r=void 0,o=void 0,e=!1,d):1===h?a(l,u,i=c,v,n,t):-1===h?a(l,u=c,i,v,n,t):void 0};module.exports=a; | ||
},{}],"h1mC":[function(require,module,exports) { | ||
var r=require("fs"),n=require("path"),e=require("./searchfile"),t=n.join(__dirname,"../data");module.exports=function(u){var i=n.join(t,"data_"+u.substr(1,2)+".bin");if(u=+u.substr(3,4),!r.existsSync(i))return null;var s=r.statSync(i).size,a=5*u,o=s,c=r.openSync(i,"r"),l=e(c,0,o,function(r){return 5*Math.floor(r/5)},function(r){return r.length>=5},function(r){var n=256*r[0]+r[1];return n===u?0:n<u?-1:1},a);return r.closeSync(c),l?{addressIndex:256*l[2]+l[3],spIndex:l[4]}:null}; | ||
},{"./searchfile":"rfCw"}],"v3ad":[function(require,module,exports) { | ||
const e=require("fs"),r=require("path"),t=JSON.parse(e.readFileSync(r.join(__dirname,"../data/address.bin"),"utf8"));module.exports=function(e){let r=t[e];if(!r)return null;let i=r.split("\t");return{province:i[0],city:i[1]}}; | ||
},{}],"Dwec":[function(require,module,exports) { | ||
const e=require("fs"),r=require("path"),n=JSON.parse(e.readFileSync(r.join(__dirname,"../data/sp.bin"),"utf8"));module.exports=function(e){return n[e]}; | ||
},{}],"Focm":[function(require,module,exports) { | ||
module.exports=function(e){e=e.replace(/[- ]/g,"").replace(/^(?:\+|00)?86/,"");var r=require("./readnumber")(e);if(!r)return null;var d=require("./readaddress"),n=require("./readsp"),a=d(r.addressIndex),i=n(r.spIndex);return{province:a.province,city:a.city,sp:i}}; | ||
},{"./readnumber":"h1mC","./readaddress":"v3ad","./readsp":"Dwec"}]},{},["Focm"], null) |
{ | ||
"name": "cellocate", | ||
"version": "0.1.4", | ||
"version": "1.0.0", | ||
"description": "手机归属地查询", | ||
@@ -11,8 +11,6 @@ "main": "lib/index.js", | ||
"test": "./node_modules/mocha/bin/mocha ./tests/*.js", | ||
"test-cov": "./node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha ./tests/*.js" | ||
"test-cov": "./node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha ./tests/*.js", | ||
"build": "parcel build src/index.js --target node -d lib --no-source-maps" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/TooBug/cellocate" | ||
}, | ||
"repository": {}, | ||
"keywords": [ | ||
@@ -23,7 +21,2 @@ "手机", | ||
"author": "TooBug", | ||
"license": "GPL", | ||
"bugs": { | ||
"url": "https://github.com/TooooBug/cellocate/issues" | ||
}, | ||
"homepage": "https://github.com/TooooBug/cellocate", | ||
"dependencies": {}, | ||
@@ -33,4 +26,6 @@ "devDependencies": { | ||
"mocha": "^2.1.0", | ||
"parcel-bundler": "^1.12.3", | ||
"restler": "^3.4.0", | ||
"should": "^4.4.2" | ||
} | ||
} |
@@ -47,2 +47,7 @@ # Cellocate | ||
### v1.0.0 (2019-05-25) | ||
- 更新数据到2019-05-25 | ||
- 更新地址数据格式,彻底解决取不到地址的问题 | ||
### v0.1.4 (2015-02-05) | ||
@@ -65,2 +70,1 @@ | ||
- 初始发布 | ||
@@ -255,3 +255,3 @@ /*global describe,it*/ | ||
it('号码段中找不到对应号码',function(){ | ||
var numberInfo = cellocate('17012345678'); | ||
var numberInfo = cellocate('17412345678'); | ||
should.equal(numberInfo,null); | ||
@@ -320,2 +320,1 @@ }); | ||
}); | ||
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
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 15 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2219070
58
0
303
2
69
5
6
52