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

wage-determinations-text-parser

v1.0.0

Published

JavaScript library for parsing wage determination text file. It takes wage determination file or content of text file found at https://www.wdol.gov/dba.aspx and produces JSON object described Wage Determination Object JSON Schema section.

Downloads

7

Readme

wage-determinations-text-parser

JavaScript library for parsing wage determination text file or file content from https://www.wdol.gov/dba.aspx and produces JSON object. Usage of library , schema and example of JSON object is described below.

npm install wage-determinations-text-parser

Interfaces

let parser = require('wage-determinations-text-parser');
parser.parseWageDeterminationTextFile('path/to/wage/determination/file', function(error, wageDetermination) {
  // error will be set if parser if unable to parse or provided file content is invalid.
  // wageDetermination object will be set if parser successfully parse the file text content
});
let fs = require('fs');
let parser = require('wage-determinations-text-parser');
let fileContent = fs.readFileSync('path/to/wage/determination/file', 'UTF-8');
parser.parseWageDeterminationText(fileContent, function(error, wageDetermination) {
  // error will be set if parser if unable to parse or provided content is invalid.
  // wageDetermination object will be set if parser successfully parse the text content
});

Test

    npm test

Wage Determination JSON Object Schema


{
  "type": "object",
    "properties": {
        "headerInformation": {
            "properties": {
                "constructionTypes": {
                    "description": "Names of constructions on which wage determination applied ",
                    "type": "string"
                },
                "counties": {
                    "description": "Names of counties in which wage determination applicable",
                    "type": "string"
                },
                "state": {
                    "description": "State in which wages are applied ",
                    "type": "string"
                },
                "wageDeterminationCode": {
                    "description": "Defines code which is combination of effective year and State code",
                    "pattern": "",
                    "type": "string"
                }
            },
            "required": [
                "state",
                "constructionTypes",
                "counties",
                "wageDeterminationCode"
            ],
            "type": "object"
        },
        "modifications": {
            "items": {
                "description": "List of modifications of the current wage determination. ",
                "type": "string"
            },
            "type": "array"
        },
        "wageGroups": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "occupations": {
                        "items": {
                            "properties": {
                                "fringe": {
                                    "description": "Fringe of the occupation ",
                                    "type": "string"
                                },
                                "isGroup": {
                                    "description": "Defines if the current occupation contains sub occupations ",
                                    "type": "boolean"
                                },
                                "rate": {
                                    "description": "Rate of the occupation",
                                    "type": "string"
                                },
                                "title": {
                                    "description": "Name of the occupation ",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "wageGroupCode": {
                        "description": "Unique wage group which is combination of effective date of the wage.",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "modifications",
        "headerInformation"
    ]

}

Wage Determination JSON Object Sample:

{
	"headerInformation": {
		"wageDeterminationCode": "VA160003 12/23/2016",
		"counties": "Pittsylvania County in Virginia.",
		"constructionTypes": "Building",
		"state": "Virginia"
	},
	"modifications": [
		"12/23/2016"
	],
	"wageGroups": [
		{
			"wageGroupCode": " ASBE0024-006 10/01/2016",
			"occupations": [
				{
					"title": "  ASBESTOS WORKER/HEAT & FROST INSULATOR - MECHANICAL (Duct, Pipe & Mechanical System Insulation)",
					"rate": "35.03",
					"fringe": "15.32",
					"isGroup": false
				}
			]
		},
		{
			"wageGroupCode": "ELEC0666-001 03/01/2016",
			"occupations": [
				{
					"title": "  ELECTRICIAN",
					"rate": "29.53",
					"fringe": "43%",
					"isGroup": false
				}
			]
		},
		{
			"wageGroupCode": "ENGI0147-015 06/01/2015",
			"occupations": [
				{
					"title": "\n\nPOWER EQUIPMENT OPERATOR\n",
					"rates": [
						{
							"title": "Bulldozer",
							"rate": "27.73",
							"fringe": "14.29",
							"isGroup": false
						},
						{
							"title": "Electrican",
							"rate": "27.73",
							"fringe": "14.29",
							"isGroup": false
						}
					],
					"isGroup": true
				}
			]
		},
		{
			"wageGroupCode": "PLUM0540-008 05/01/2016",
			"occupations": [
				{
					"title": "  PIPEFITTER (Includes HVAC Unit Installation)",
					"rate": "26.75",
					"fringe": "15.38",
					"isGroup": false
				}
			]
		},
		{
			"wageGroupCode": "SUVA2013-013 01/11/2016",
			"occupations": [
				{
					"title": "  CARPENTER",
					"rate": "15.60",
					"fringe": "0.00",
					"isGroup": false
				},
				{
					"title": " LABORER:  Common or General",
					"rate": "12.30",
					"fringe": "1.40",
					"isGroup": false
				},
				{
					"title": " TRUCK DRIVER:  Dump Truck",
					"rate": "11.25",
					"fringe": "0.57",
					"isGroup": false
				}
			]
		}
	]
}