eighteen-digit-salesforce-id

Pass in either 18 digit or 15 digit Salesforce id and get back the 18 digit id

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eighteen-digit-salesforce-id
1.0.08 years ago8 years agoMinified + gzip package size for eighteen-digit-salesforce-id in KB

Readme

eighteen-digit-salesforce-id
npm install --save eighteen-digit-salesforce-id
var get18DigitId = require('eighteen-digit-salesforce-id');
console.log(get18DigitId('00341000001sKYi'));  // logs '00341000001sKYiAAM'

Note - if you pass in a string that's already 18 characters, you just get that same string back.
Note - if you pass in a string that's neither 15 nor 18 characters long, it throws an error.