Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 305 Bytes

File metadata and controls

16 lines (13 loc) · 305 Bytes

Safe encodeURIComponent and decodeURIComponent.

import {
  encodeComponent,
  decodeComponent
} from 'deuri';

// Encode a string, converts to well
// formed string if necessary
encodeComponent(uri);

// Decode the full string
// Returns undefined if uri is malformed
decodeComponent(uri);