Skip to content
Generate C #defines from objects
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
README.md
index.js
package.json

README.md

cdefine

cdefine([
    { FOO: 0xFF, BAR: 0xF0 },
    { TRUE: 'FALSE' }
], {hex: true});

Yields

#define FOO 0xFF
#define BAR 0xF0

#define TRUE FALSE

Have fun! <3

Something went wrong with that request. Please try again.