4.1.3 • Published 10 months ago
cep-any v4.1.3
cep-any
A low dependency CEP lib
WARNING
if you use node.js 15 or lower, see 1.3.0 version, 2.0.0 version breaking changes because fetch native has been in use
Simple use
const {cep} = require("cep-any");
cep("41342315").them(console.log);
import {cep} from "cep-any";
Using factory and create a custonservice
const { factory, CepService , Requester} = require("cep-any");
class NewService extends CepService {
// Requester is a http client using fetch api, but you shuld be replace for another lib
constructor() {
super('custonapi', Requester)
}
handler = async (cep) => {
return {
cep: "88888888",
city: "something",
neighborhood: "something",
street: "something",
state: "AB",
};
};
}
const instanceService = new NewService("newService");
const handler = factory({
useDefaultProviders: false,
custonProviders: [instanceService],
});
handler.execute("41342315").them(console.log);
4.1.3
10 months ago
4.1.2
12 months ago
4.1.1
1 year ago
4.1.0
1 year ago
4.0.0
2 years ago
3.5.3
2 years ago
3.6.0
2 years ago
3.5.1
2 years ago
3.5.0
2 years ago
3.4.0
2 years ago
3.2.2
3 years ago
3.3.5
3 years ago
3.3.4
3 years ago
3.3.3
3 years ago
3.2.3
3 years ago
3.2.1
3 years ago
3.2.0
3 years ago
2.0.2
3 years ago
3.1.1
3 years ago
3.1.0
3 years ago
3.0.0
3 years ago
1.3.0
3 years ago
2.0.0
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago