npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ares-data

v2.0.0

Published

Load information about employers from Czech ares service.

Downloads

46

Readme

NPM version Dependency Status Build Status

Donate

ares-data

Load information about employers from Czech ares service.

Documentation of Ares: documentation

Installation

$ npm install ares-data

or download standalone version:

Information

Every find* method returns promise, which you can than use for access loaded data.

Finding data by identification (IČO)

var Ares = require('ares-data');
var ares = new Ares;

ares.findByIdentification(12345678, (data, err) {
	// do something with loaded data
});

data variable contains length parameter with information about how many items were loaded and data parameter which is array with these data.

Finding data by company name

ares.findByCompanyName('some company name', function(data, err) {

});

In browser

Ares unfortunately does not support any possibility to load data directly from browser (cross domain request), so you have to create some kind of bridge on your server. This will load ares XML API page (http://wwwinfo.mfcr.cz/cgi-bin/ares/darv_std.cgi) with given get parameters and send it back to the browser (without any transformations).

Some examples of these bridges are here.

Second step is to set new url for loading data.

var Ares = require('ares-data');
var ares = new Ares('http://localhost/ares.php/');

or globally:

var Ares = require('ares-data');
Ares.URL = 'http://localhost/ares.php/';

Original data

This package automatically changing loaded data. If you want to get original data (transformed and simplify to json), you have to access lastOriginalData variable.

ares.findByCompanyName('some company name', function(data, err) {
	var original = ares.lastOriginalData;
});

Tests

$ npm test

Changelog

  • 2.0.0

    • Using gulp with browserify for builds
    • Optimized repository
    • Created standalone versions
    • Removed dependency on q (BR break)
    • Removed dependency on moment
    • Using xml-parser instead of xml2js
    • Moved under Carrooi organization
    • Added to bower
  • 1.2.2 (there should be 1.2.0, but I made a mistake)

    • Added some badges.
    • Updated dependencies
    • Better tests
    • Tests uses mocks instead of direct access to servers
  • 1.1.3

    • Some companies haven't got an orientation number
    • Optimized dependencies
  • 1.1.2

    • Added some documentation
  • 1.1.1

    • Old version of browser-http
  • 1.1.0

    • Ability to change source url
    • Added support for browsers
  • 1.0.3

  • 1.0.2

    • Removed preparations for support in browser (Origin is not allowed by Access-Control-Allow-Origin)
  • 1.0.1

    • Moved to xml2js module
  • 1.0.0

    • Initial version