tahamajs's picture
download
raw
408 Bytes
import ParsingError from './error/parsing_error';
import jsonlint from '@mapbox/jsonlint-lines-primitives';
export default function readStyle(style) {
if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {
try {
return jsonlint.parse(style.toString());
} catch (e) {
throw new ParsingError(e);
}
}
return style;
}

Xet Storage Details

Size:
408 Bytes
·
Xet hash:
721eb602c804d4a4ff2662aa755014bc7a73d17892457ec3e995b9170faceaa6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.